Meeting Rooms
Easy · Intervals · Array · Sorting
Problem
Given meeting intervals [start, end], return whether a single person could attend all of them — that is, whether none of them overlap.
A meeting ending exactly when another begins does not conflict.
Examples
Input: intervals = [[0,30],[5,10],[15,20]] Output: False
[0,30] overlaps the others.
Input: intervals = [[7,10],[2,4]] Output: True
They do not overlap.
Constraints
- 0 <= len(intervals) <= 10^4
- 0 <= start < end <= 10^6
Approaches
- Reuse the room counter — time O(n log n), space O(n)
Related problems
Start free on Cariara · Coding problems · System design studio