Staff schedule working alone minutes
问题 I have list of times for staff. I need to find out if any of the staff was working alone and how many minutes they were working alone for the day | staff| start | end | |:--- |:--- |:--- | | 1 | 11:05 | 20:00 | | 2 | 11:00 | 17:00 | | 3 | 19:00 | 03:00 | | 4 | 13:00 | 20:00 | | 5 | 19:00 | 03:00 | With Andreas' help, following is the code that gets the first and last person who was working alone with alone minutes, but its not quite right. Because if there were 3 people with different times