When Hours Collide
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant feedback.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L5
Problem
A shared room-booking calendar stores each reservation as a `[name, start, end]` record, and you need to flag every scheduling clash. Ranges are half-open [start, end), so a booking that ends exactly when another begins does not clash. Return each clashing pair once as `[name_a, name_b]` with the earlier-starting booking first, ordered by the first booking's start and then the second's, or an empty list when nothing clashes.
Summary
Two reservations, one slot. Find every clash.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and checks it automatically.