- Difficulty: Medium
- Tags: LeetCode, Medium, Greedy, Array, Two Pointers, Prefix Sum, Sorting, Heap (Priority Queue), leetcode-253, Sort, O(nlogn), O(n), 🔒
Problem
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 <= 104
0 <= starti < endi <= 106