Employee Free Time
Hard · Intervals · about 30 minutes
Asked at Airbnb, Google, Pinterest, Apple, Uber, Expedia Group, Zillow, Yelp.
Each employee has a sorted list of non-overlapping working intervals. Here schedule[i] lists employee i's intervals flattened as [start1, end1, start2, end2, …]. Return the finite intervals of free time common to all employees, as [start, end] pairs in sorted order (intervals of zero length are not included).