Meeting Rooms
Minimum rooms = maximum number of simultaneous meetings. Sweep sorted starts and ends.
Intervals and Greedy Choices: How many rooms
t = 2: c starts, taking a room. Open meetings: 3. That is a new maximum, so at least 3 rooms are needed.
Cost
- Best
- O(n log n)
- Average
- O(n log n)
- Worst
- O(n log n)
- Space
- O(n)
Before this
Related
Leads to
Topics that need this one first.
Taught by the same lesson
Intervals and Greedy Choices covers these too, in the same run.