Practice/Bloomberg/Meeting Room Scheduling - Minimum Rooms Required
CodingMust
You are building a conference room booking system. Given an array of meeting time intervals where each interval is represented as [start, end], calculate the minimum number of conference rooms required to accommodate all meetings without any scheduling conflicts.
Each meeting interval represents a half-open interval [start, end) where the meeting starts at time start and ends just before time end. This means that if one meeting ends at time t and another starts at time t, they do not conflict and can use the same room.
[start, end] pairs where start < end0 <= meetings.length <= 10^40 <= start < end <= 10^6Example 1:
` Input: [[0, 30], [5, 10], [15, 20]] Output: 2 Explanation:
Example 2:
Input: [[7, 10], [2, 4]] Output: 1 Explanation: The first meeting ends at 4 before the second starts at 7, so one room suffices.
Example 3:
Input: [[1, 5], [2, 7], [3, 9], [4, 6]] Output: 4 Explanation: At time 4, all four meetings overlap simultaneously, requiring 4 rooms.