Meeting Rooms — Intervals
Decide whether any two of a set of timed meetings overlap, with one ending exactly as another starts not counting as a clash.
Intervals · Easy
The problem
Your calendar lists the start and end times of your meetings. Decide whether you could attend all of them.
The story
Your calendar lists up to 10 meetings, each with a start and end time between 0 and 30. Could you attend all of them? A meeting ending at 5 and another starting at 5 don't clash, and an empty calendar is easy.
What to return
- Return true if no two meetings overlap, otherwise false.
- A meeting that ends at time 5 and one that starts at time 5 do not overlap.
- No meetings at all means true.
Constraints
- 0 <= intervals.length <= 10
- each meeting is [start, end] with 0 <= start < end <= 30
Example
- Input
intervals = [[2, 8], [6, 9], [12, 15]]- Output
false