0

Intervals

Sort by start or end, then sweep. Covers merging, meeting rooms and scheduling.

Newinterview weight 6011 problems0 visualisers
18
mastery
Attempts logged
0
Predicted success on the next one
33%
Solved here
0 / 11

What you actually need to hold in your head

  • Two intervals overlap when each starts before the other ends
  • Sort by end for maximum non-overlapping count
  • Sweep line with plus one and minus one events
  • A min heap of end times counts rooms
Comfortable with these first
This unlocks
Next in the path
Linked List

Patterns in this topic

The trigger phrases are what you are training yourself to notice.

Intervals problems

Ordered by sheet phase, so the early ones are the highest signal.

0 / 11 solved
1
MIntervals
2
MIntervals
3
MIntervals
4
EIntervals
5
6
7
HIntervals
8
9
10
11
MIntervals