Loading...
Loading...
Loading...
Meetings have a start and an end time. A room is free at the minute a meeting in it ends. Print the smallest number of rooms that can hold all meetings.
Example 1
Input
3 0 30 5 10 15 20
Output
2
Example 2
Input
2 7 10 2 4
Output
1
Try the problem first. Open one hint at a time.
Sort by start and track end times of rooms in use.
A min-heap of end times shows the room that frees first.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor