easyIntervalsLinkedIn
Boardroom Conflict Check
A dispatcher checks whether one presenter can take all meetings back-to-back with no clash.
Given meeting intervals, return true iff a single person can attend all meetings (no two overlap).
Choose approach
1/2
Narrationstep 1 of 2
Sorted by start.
Variables
How to think about it
- Any overlap after sort fails.
- O(n) scan post-sort.
Edge cases to catch in interview
- Empty -> true.
- Touching endpoints (end == next.start) OK.
Examples
Example 1
true{"intervals":[[7,10],[2,4]]}
Try your own input
SpacePlay / pause
← / →Previous / next step
RReset to start
. or >Cycle speed