Meeting Rooms II
Solution ApproachWas this helpful?
Medium•array•Expected: O(n log n) time, O(n) space
heapsorting
Problem
Given an array of meeting time intervals, find the minimum number of conference rooms required.
Example 1:
Input: intervals = [[0, 30], [5, 10], [15, 20]]
Output: 2
Explanation: Meeting [0,30] overlaps with [5,10], so 2 rooms are needed.
Example 2:
Input: intervals = [[7, 10], [2, 4]]
Output: 1
Explanation: No overlap, so 1 room is sufficient.
Reference solution unlocks after your first submission
Loading...
