← 返回 bloomberg 的题目列表Check If Meetings Can Be Scheduled Without Overlaps
类型:online_judge
bloomberg
Write a function to determine if a group of meetings can all be scheduled in one meeting room. Each meeting has a start time and an end time, and you need to check if the given schedule of meetings has any overlaps.
Input Format:
A two-dimensional integer list intervals, where each element is a list containing two integers representing the start and end times of a meeting.
Output Format:
Return a boolean value. Return True if all meetings can be scheduled without overlap, otherwise return False.
Example:
Input: intervals = [[0, 30], [5, 10], [15, 20]]
Output: False
Input: intervals = [[7, 10], [2, 4]]
Output: True
Constraints:
1 <= intervals.length <= 10^4
0 <= intervals[i] <= 10^6
Example
Input
[[0, 30], [5, 10], [15, 20]]