Problem
Each meeting is a pair [start, end]. Return the **minimum number of rooms** needed so that every meeting gets a room. A room freed at time 10 can be used by a meeting that starts at 10.
Example 1
- Input
- [[0, 30], [5, 10], [15, 20]]
- Output
- 2
Example 2
- Input
- [[7, 10], [2, 4]]
- Output
- 1
Example 3
- Input
- [[1, 5], [5, 10]]
- Output
- 1
- Why
- back to back shares a room
Constraints
0 <= intervals.length <= 10^40 <= start < end <= 10^6