Back to problems

Employee Shift Timeline Table

Algorithm · Google · Medium

You are given a 2D list schedules that represents shift schedules for employees. Each entry in the list is a triplet containing the employee’s name, a start time, and an end time. Your job is to combine overlapping shifts and produce a timeline of distinct time intervals. For each interval, output the start time, end time, and the list of employees who are working during that period. In the resulting rows, the employee names must follow the order in which they first appeared…

Loading the rest of the question…