Interval Scheduling — Partitioning / Meeting Rooms II

Min rooms = max overlap depth — watch the min-heap of end times assign rooms

Intervals

Run

Speed

Result

Intervals n
8
Rooms open
Min rooms
Max depth

Min-heap of end times

Log

Timeline (rooms as horizontal tracks)

placed interval sweep instant peak-overlap band

Overlap depth over time

Explanation

Load intervals and press Run all to sweep left to right, assign each interval to the earliest-freeing room (min-heap), and confirm that the number of rooms equals the maximum overlap depth.