Practice/Apple/Leetcode 253. Meeting Rooms II
CodingMust
You are building a scheduling system for a company that needs to allocate conference rooms efficiently. Given a collection of meeting time intervals where each interval is represented as [start, end], determine the minimum number of conference rooms required to accommodate all meetings without any scheduling conflicts.
Each meeting occupies a room from its start time (inclusive) to its end time (exclusive). For example, a meeting from [0, 30] means the room is occupied from time 0 up to (but not including) time 30.
[start, end] where 0 ≤ start < end ≤ 1,000,000Example 1:
` Input: [[0, 30], [5, 10], [15, 20]] Output: 2 Explanation:
Example 2:
Input: [[7, 10], [2, 4]] Output: 1 Explanation: The meetings don't overlap, so 1 room is sufficient.
Example 3:
Input: [[1, 10], [2, 6], [3, 5], [7, 9]] Output: 3 Explanation: At time 3, three meetings are happening simultaneously: [1,10], [2,6], and [3,5].