Meeting Rooms II

Problem Given an array of meeting time intervals [start, end], return the minimum number of conference rooms required so that no two meetings sharing a room overlap in time.

Input / Output

  • Input: an array of intervals [start, end].
  • Output: the minimum number of rooms needed.

Constraints

  • 1 ≤ n ≤ 10^4.
  • A meeting ending at time t and another starting at t do not conflict (can share a room).

Example

  • [[0,30],[5,10],[15,20]] → 2 ([0,30] overlaps both others, which do not overlap each other).
  • [[7,10],[2,4]] → 1.
added …
LeaderboardSalaryAccount