Be explicit about inclusive ends and whether touching intervals overlap.
Intervals
5 chapters · 8 challenges · The Overlap Isles
Understand the idea, practise through play, then prove it in code. Choose your next quest below.
Visual introduction to this topic
What is an interval problem?
An interval represents a span with a start and an end. Interval algorithms reason about overlap, gaps, active spans, and which event begins or finishes first.
Think of booking rooms. Two meetings conflict when their occupied time overlaps. Sorting by start time turns a messy calendar into one left-to-right sweep.
Sort the boundaries, then decide whether to merge, count, or schedule.
Start order reveals the next possible conflict or gap.
Heaps or event counts handle many overlapping spans at once.
Merge connected spans
Merge
0/3 completePractice merge through 3 visual expeditions.
Sweep Line
0/1 completePractice sweep line through 1 visual expedition.
Meeting Rooms
0/1 completePractice meeting rooms through 1 visual expedition.
Scheduling
0/2 completePractice scheduling through 2 visual expeditions.
Difference Events
0/1 completePractice difference events through 1 visual expedition.
Built from authoritative material
This track is checked against the sources below. Visual traces still carry their own complete or guided coverage label, so unfinished explanations are not presented as complete executions.