Meeting Concurrency Intervals
Problem statement
Given meeting intervals and a positive target x, return each maximal half-open interval during which exactly x meetings are active.
Function
exactMeetingConcurrency(meetings: int[][], x: int) → int[][]Examples
Example 1
meetings = [[1,4],[2,5],[4,6]]x = 2return = [[2,5]]A simultaneous end and start keeps the count at two.
Example 2
meetings = [[1,3],[1,3]]x = 2return = [[1,3]]Both meetings are active throughout the interval.
Constraints
0 <= meetings.length <= 100000- Each row is
[start,end]withstart <= end. 1 <= x <= meetings.length + 1