FreeCareerPath
Build the PrimitiveEasy

Merge Booking Windows

A room booking system stores reservations as `(start, end)` minute offsets from midnight. Overlapping and touching reservations should be collapsed into single continuous blocks before they are shown on a calendar. Implement `merge_windows(windows)`, which returns the merged blocks in ascending order of start time. Treat the windows as **half-open** — `[60, 90)` and `[90, 120)` are adjacent and *do* merge into `[60, 120)`, because the room is never actually free at minute 90. Say so out loud in an interview: the convention is the part being assessed, not the loop.

What to expect: A timer starts when you begin. Edit the starter code, run it against the test suite as many times as you like, then finish when you're done. The reference solution and interviewer follow-up questions unlock only after you finish.

Log in to start this session

Timed sessions and your results for "Merge Booking Windows" are saved to your account — logging in takes a few seconds.

Merge Booking Windows — FreeCareerPath