Description
3. Room Scheduling

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
Constraints:
  • 0 <= start < end <= 24
  • The number of existing meetings will be at least 0 and at most 10^4.
  • Existing meetings and the new meeting will be represented by their start and end times, with no two existing meetings having the same start time.
Test Cases

Case 1
Case 2

Input

[[1, 3], [6, 9]], [2, 5]

Output

false