In-Memory Meeting Room Manager
Reported by candidates from Runloop's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
Runloop reported this one in September 2026, and the whole question hinges on one data structure choice: a hash map of ID to reservation plus a sorted interval structure per room. It looks like string parsing and bookkeeping. It isn't. With up to 100000 commands, the naive scan-every-reservation approach is the trap. If your OA invite is for this one, know the shape before you open it. And if you blank mid-assessment, StealthCoder sits invisibly on your desktop as a safety net that reads the problem and hands you a working structure.
The problem
Build an in-memory meeting-room manager that processes an ordered list of command strings. Initially, there are no active reservations. Each command uses single spaces between tokens and has one of these forms: RESERVE id room start end requests reservation id for room during the half-open interval [start, end). The operation succeeds only when id is not already active and the interval does not overlap any active reservation for the same room. Reservations in different rooms do not conflict. Intervals that only touch, such as [10, 20) and [20, 30), do not overlap. DELETE id removes the active reservation with that ID. It succeeds when the ID is active and fails otherwise. A successfully deleted ID may be used again later. Return one boolean for every command in input order. A successful operation contributes true; a rejected operation contributes false. A rejected operation never changes the manager state. Function processMeetingRoomOperations(operations: List<String>) → boolean[] Examples Example 1 operations = ["RESERVE m1 atlas 10 20","RESERVE m2 atlas 20 30","RESERVE m3 atlas 15 25","RESERVE m3 zephyr 15 25","DELETE m1","RESERVE m4 atlas 12 18","DELETE missing"] return = [true,true,false,true,true,true,false] The first two Atlas reservations touch at time 20, so both succeed. The overlapping Atlas request for m3 fails and leaves that ID available; the same ID can then reserve the independent Zephyr room. Deleting m1 opens its former interval for m4. Example 2 operations = ["RESERVE r1 north 5 10","RESERVE r1 south 10 15","DELETE r1","DELETE r1","RESERVE r1 south 10 15","RESERVE r2 south 9 10","RESERVE r3 south 14 16"] return = [true,false,true,false,true,true,false] An active reservation ID is globally unique, even across rooms. After r1 is deleted, the second deletion fails and the ID can be reused. Reservation r2 touches r1 at time 10, while r3 overlaps it. Constraints 1 <= operations.length <= 100000 Each operation has exactly one documented form. Each reservation ID and room name has between 1 and 32 lowercase ASCII letters, digits, or hyphens. Every start and end is a decimal integer string satisfying 0 <= start < end <= 10^9. The total number of characters across all operations is at most 2000000.
Reported by candidates. Source: FastPrep
Pattern and pitfall
Keep two maps. First, id to (room, start, end) for global uniqueness and fast DELETE. Second, room to a sorted collection of active intervals. For RESERVE, reject if the id is active. Then find the neighbor intervals in that room: the one with the greatest start less than your end, and check whether its end is greater than your start. Half-open intervals mean touching is fine, so use strict comparisons. Active intervals in a room never overlap, so checking one predecessor is enough. In Java use a TreeMap per room, in C++ a std::map. In Python, bisect on a sorted list works but insertion and deletion cost O(n), which is usually acceptable here. The pitfalls: mutating state before validating, and forgetting to remove the interval from the room on DELETE. Rejected commands must change nothing. If the sorted-structure part escapes you live, StealthCoder is the hedge that produces it for you.
StealthCoder is the hedge for the one pattern you didn't drill. It runs invisibly during the screen share.
You can drill In-Memory Meeting Room Manager cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. If you're reading this with an OA window open, you're who this was built for.
Get StealthCoderRelated leaked OAs
You've seen the question.
Make sure you actually pass Runloop's OA.
Runloop reuses patterns across OAs. If you're reading this with an OA window open, you're who this was built for. Works on HackerRank, CodeSignal, CoderPad, and Karat.
In-Memory Meeting Room Manager FAQ
How hard is the Runloop meeting room manager question really?+
Medium at most. The logic is simple, but 100000 operations punishes a linear scan per reservation. If you use a sorted structure per room and a hash map for IDs, it's mostly careful implementation and edge cases.
What's the trick to checking overlap fast?+
Keep each room's active intervals sorted by start. For a new [s, e), find the interval with the largest start below e and check whether its end is greater than s. Since active intervals never overlap, that single neighbor check is enough.
Do touching intervals count as conflicts?+
No. Intervals are half-open, so [10, 20) and [20, 30) coexist. Use strict inequalities: conflict only when existing.start < new.end and new.start < existing.end. Using less-than-or-equal is the most common wrong answer.
Can a reservation ID be reused?+
Yes, in two cases. A failed RESERVE never claims the ID, and a successfully deleted ID is free again. But while an ID is active, it's unique across all rooms, so the same ID in another room is rejected.
How do I prepare for this in 48 hours?+
Practice interval insertion with a sorted map and neighbor lookup, plus a command-parsing loop. Split each string on spaces, switch on the first token, and return a boolean per command. Write a few tests from the two examples, especially touching intervals and ID reuse.