Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 09 · DSA · Four patterns the ladders lean on · about 16 min to read

Play it as a journeyTutor comes with a plan

Walk the clock: sweep line

Meeting Rooms II
Meeting Rooms II · Open board

Bars on a timeline, one bar per meeting, and the question of how many bars stand over one moment.

Lesson 92 of 96 in DSA

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 1977: how much of the line is covered?
  • Events: a bar becomes two moments
  • The sweep line: one counter, one pass
  • Why this is cheap
  • The tie rule: two events at the same time
  • The active set: when a counter is not enough
  • The strip: area between two events
  • The walk for Klee’s question
  • LeetCode 2406, Divide Intervals Into Minimum Number of Groups
  • LeetCode 218, The Skyline Problem
  • LeetCode 850, Rectangle Area II
  • The measured gap
  • Where this idea shows up

Terms it explains: event, sweep line, tie rule, active set, strip, Common mistakes.

Review DSA