Skip to content
DSA Visualizerpreview

Meeting rooms (fewest rooms)

Seat meetings in start order, reusing the room that frees up first; the rooms opened is the answer.

O(n log n) time · O(n) space

Intervals0-6, 1-3, 2-5, 4-8, 5-9, 7-10, 9-12

How many rooms do 0–6, 1–3, 2–5, 4–8, 5–9, 7–10, 9–12 need?

Meetings 0–6, 1–3, 2–5, 4–8, 5–9, 7–10, 9–12. 0 rooms in use: .
  • compare
  • swap or write
  • settled

1 / 10

Speed

Space play · ← → step · Home End jump · drag the strip to scrub