You are given schedules for multiple employees. schedules[i] is a list of busy intervals for employee i, where each interval is half-open [start, end) in minutes from 0 to 1440 for a single day. Return all maximal half-open intervals [s, e) during which every employee is free. Requirements:
(
-
Input may contain up to 10^4 total intervals across all employees.
(
-
Intervals within an employee may be unsorted and may overlap; you must normalize as needed.
(
-
Output intervals must be sorted, non-overlapping, and within [0,
1440). Sub-questions: How would you handle schedules provided as strings like "09:30-12:00" and mixed time zones? How would you extend the solution to multiple days or to streaming updates to schedules? Discuss the time and space complexity and the data structures you would choose.