Search topics...

Meeting Rooms II

medium
arrayTime: O(n log n)Space: O(n)Frequency: 5

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.
heapsorting