Meeting rooms needed
Mediumintervalssortingheapgreedy
Each [start, end] is a meeting. Return the fewest rooms that fit them all. A meeting ending at 10 and another starting at 10 can share a room.
Example 1
Input: intervals = [[0,30],[5,10],[15,20]] Output: 2
Example 2
Input: intervals = [[7,10],[2,4]] Output: 1
Constraints
- 1 ≤ intervals.length ≤ 10⁴
- 0 ≤ start < end ≤ 10⁶
Submit checks your solution against 8 tests, including hidden ones.
/**
* @param {int[][]} intervals
* @return {int}
*/
function minMeetingRooms(intervals) {
}