Test Cases
Case 1
Case 2
Input
[[1, 3], [6, 9]], [2, 5]
Output
false
A company is trying to find out if a meeting room is available for a new meeting. The meeting room can only hold one meeting at a time. Write a function that determines if a new meeting can be scheduled in the meeting room given the existing meeting times.
The function should accept an array of existing meetings (each represented as a tuple [start, end]
where start
and end
are the start and end times of the meetings) and a new meeting time (also represented as a tuple/array [start, end]
). The function should return true
if the new meeting can be scheduled without overlapping any of the existing meetings, and false
otherwise.
Example 1
Input: [[1, 3], [6, 9]], [2, 5]
Output: false
Example 2
Input: [[1, 3], [6, 9]], [4, 5]
Output: true
0 <= start < end <= 24
Input
Output