Skip to main content

Practice · 3 of 3

Meeting Rooms

CHALLENGE
Difficulty: advanced+25 XP

**Problem.** Each query: n then n intervals s e (endpoints may touch). Print the minimum number of rooms. **Constraints:** 1 ≤ n ≤ 200000; 0 ≤ s < e ≤ 10^9; [a,b) semantics — a meeting ending at t does not overlap one starting at t. Sweep + min-heap; the strict-< W overcounts touching intervals.

Back to lesson: Practice: Synthesis Gauntlet