 All Problems
Meeting Rooms II
medium
array
greedy
heap
facebook
google
amazon

Given an array of meeting time intervals intervals where intervals[i] = [starti, endi], return the minimum number of conference rooms required.

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^4
  • 0 <= starti < endi <= 10^6
Run to check your code against the sample cases, or submit to run every case