Problem statement
Design the object model and public APIs for the room-booking core an office uses to reserve meeting rooms for time ranges, matching each request to a room that fits the party and its required amenities without overlapping reservations.
Operating context. A building has rooms across floors, each with a capacity and a set of amenities (projector, video-conference, whiteboard). An organizer requests a room for a time range plus a required capacity and amenity set; the system either assigns a fitting free room or reports that none is available. Reservations can be cancelled, freeing the room for that range. Multiple organizers book concurrently and must never be granted the same room for overlapping times. Single building, in-process service, one wall clock.
Out of scope. Calendar / email invitations, check-in and occupancy sensors, the REST surface, cross-building federation, and persistence (assume in-memory for v1).
What to produce. The class hierarchy (Room, Reservation, Building / Floor, booking service), the public API each exposes, and the state transitions for a reservation (requested → confirmed → cancelled / completed). Be explicit about: how overlapping reservations on one room are detected efficiently, how the room-selection rule is pluggable (smallest fitting room today, cheapest tomorrow), and how concurrent requests for the last suitable room resolve to a single winner.
Requirements
This assessment is a Premium feature.
The statement above is free to read. The functional and non-functional requirements, and the graded canvas that scores your design against them, come with Premium.
Topics
- System Design LLD
- Oop Solid
- Patterns Strategy
- Algorithms Interval-Tree
- Concurrency Locks