253. Meeting Rooms II
Practice Meeting Rooms II for free on NudgeCode: Medium, Greedy pattern. Write it in Python or JavaScript, run the tests in your browser, and ask for a hint when you are stuck.
Each [start, end] in intervals is a meeting. Return the smallest number of rooms needed so that every meeting gets a room. A room freed at time t can host a meeting starting at t.
Example
intervals = [[0,30],[5,10],[15,20]] -> 2
intervals = [[7,10],[2,4]] -> 1
Constraints
- 1 <= intervals.length <= 10^4
- 0 <= start < end <= 10^6