Maximum Concurrent Meeting Time Slots
Problem statement
Each meeting occupies the half-open interval [start,end). Return every maximal positive-length interval during which the global maximum number of meetings is active, ordered by time. Merge adjacent output intervals with the same maximum count.
Return an empty array when there are no meetings.
Function
maximumConcurrentSlots(meetings: int[][]) → int[][]Examples
Example 1
meetings = [[100,300],[145,215],[200,230],[215,300],[215,400],[500,600],[600,700]]return = [[215,230]]Four meetings are active throughout [215,230), the global maximum.
Constraints
- At most
10^5meetings. start < end.