← PATTERN ATLAS
PATTERN 14 · 5 PROBLEMS

Intervals & sweep line

Sort boundaries so overlap and resource changes become one directional scan.

Start the first lesson ↗
MASTER KEYAfter sorting, only the active frontier can conflict.
0OF 5
RECALLED
RECOGNITION SIGNAL

Intervals before, overlapping, and after the new interval form three ordered phases.

01
Not started

Insert Interval

Intervals before, overlapping, and after the new interval form three ordered phases.

↗
02
Not started

Merge Intervals

After sorting by start, only the last merged interval can overlap the next.

↗
03
Not started

Non-overlapping Intervals

Keeping the interval that ends earliest leaves the most room for future intervals.

↗
04
Not started

Meeting Rooms

After sorting by start, only adjacent meetings can reveal an overlap.

↗
05
Not started

Meeting Rooms II

A room frees when the earliest current end is no later than the next start.

↗