Each meeting is [start, end] (with start < end). A meeting that ends at time t does not conflict with one that starts at t. Return the fewest rooms needed to hold all the meetings.
For [[0, 30], [5, 10], [15, 20]] the answer is 2.
The starter code counts the running meetings at every start time. It is correct but too slow for many meetings.
Example 1
Input:
min_meeting_rooms([[0, 30], [5, 10], [15, 20]])
Output:
2
Example 2
Input:
min_meeting_rooms([[7, 10], [2, 4]])
Output:
1
0 <= len(meetings) <= 1000000 <= start < end <= 10**9No results yet
Run your code to check it against the examples, or submit to run every test.