Worked Round: Room Booking

Topics Covered

The Task and Orientation

The README

Minutes zero to four: reading

Minutes four to eight: tests and questions

Minutes eight to ten: the plan

Commentary

What changes in TypeScript and Java

Summary of orientation

Why this task shape is common

What the interviewer is watching in the first ten minutes

The value of the second question

Reading the store module

Saying the plan in terms of tools

A short version of the orientation

Practising orientation on this task

This is the first of three worked rounds. Each one follows a single candidate through a full sixty minute AI assisted round, from the first read of the README to the final summary, with commentary on each decision. Each ends with an exercise taken from the round, and a pointer to practise a full round yourself.

The task here is a small room booking service. It has three stages: a conflict check, a twist that adds cleanup buffers and an extend stage that searches for the earliest free slot. The candidate works in Python, but the commentary notes what changes in TypeScript and Java.

A small booking service with three stages.

The README

The README says: the service manages bookings for a single meeting room. A booking has a start and an end, in minutes since midnight. Bookings are half open: a booking from 540 to 600 occupies minutes 540 up to but not including 600. A new booking request is accepted if it does not overlap any existing booking, and refused otherwise. A request whose end is not after its start is invalid and raises an error. Implement can_book(existing, start, end), which returns true or false.

The repository has a bookings module with a stub for can_book, a store module that loads bookings and a test file with five visible tests: an empty room accepts, a clear overlap refuses, a request entirely inside an existing booking refuses, a request after all bookings accepts and an end before start raises.

Minutes zero to four: reading

Interview Dialogue

InterviewerClick to reveal answer
CandidateReading the README first, then the bookings module and the tests.
CandidateSo bookings are half open, in minutes. A request is accepted if it overlaps nothing. End not after start is an error.
CandidateHalf open means a booking ending at 600 and one starting at 600 do not overlap. That is the boundary I will want to test.
Show all answers
End is exclusive, so back to back bookings are fine.

The candidate has said the rule back and named the most important boundary before reading any code. Half open intervals are the core of the task, and back to back bookings are where off by one errors live.

Minutes four to eight: tests and questions

Interview Dialogue

CandidateFive visible tests. Empty room, clear overlap, request inside a booking, request after everything and the error case.
CandidateNot covered: back to back in either direction, a request that contains an existing booking and a zero length request.
CandidateTwo questions. Is a zero length request, start equal to end, invalid?
InterviewerClick to reveal answer
CandidateAnd are existing bookings guaranteed not to overlap each other?
InterviewerClick to reveal answer
Show all answers

The second question matters more than it looks. The candidate is checking an assumption about the input that the README does not state. The answer, for this stage, sets up something the extend stage will revisit.

Minutes eight to ten: the plan

Interview Dialogue

CandidatePlan: I will write the validation myself, it is two lines. Then the overlap check, which is a single condition, so I will probably type it myself too and ask the assistant to draft the tests for the gaps I listed, which I will review.
CandidateCheckpoint times: I started at two, so plan stated by quarter past, stage one done by twenty to three, close by ten to.

Commentary

Ten minutes, no code yet, and the candidate has: the rule said back, the boundary named, the tests mapped with three gaps, two clarifying questions answered, a plan that assigns each piece to hand or assistant and checkpoint times. The plan also makes a deliberate choice: the core logic is small enough to type, so the assistant is used for test drafting instead. That is a good use of the tool for a task this size.

What changes in TypeScript and Java

In TypeScript, the signature would be canBook(existing: Booking[], start: number, end: number): boolean, and a candidate should ask whether start and end can be non integer numbers, since the type allows it. In Java, canBook(List of Booking existing, int start, int end) with Booking as a record, and a candidate should ask whether the list can be null as well as empty.

Summary of orientation

Read the rule, name the interval semantics, map the tests, ask about input assumptions and state a plan with checkpoint times. Ten minutes well spent.

Why this task shape is common

Interval tasks such as bookings, reservations, shifts and maintenance windows are common in AI assisted rounds because they are small, familiar and full of boundaries. Everyone understands a meeting room, so the interviewer does not need to explain the domain. But the details, open or closed ends, buffers, sorting and overlaps in the data, give plenty of room for an assistant to make plausible mistakes. A candidate who handles one interval task well has a pattern for all of them.

What the interviewer is watching in the first ten minutes

In the first ten minutes, the interviewer is mostly watching for three things. Does the candidate read before typing? Does the candidate find the interval semantics and say them back? Does the candidate know what the tests cover? A candidate who does all three in the first ten minutes has usually earned a strong score on understanding before writing any code.

The value of the second question

The candidate's question about whether existing bookings can overlap looks like caution, and it is. But it also sets up something useful later. By asking it early and getting a clear answer for stage one, the candidate created a fact they can refer back to: for stage one, bookings do not overlap. When a later stage changes the data source, that fact is exactly what needs rechecking. Candidates who never ask the question have no reason to recheck it.

Reading the store module

The candidate did not read the store module in detail during orientation. It loads bookings, but stage one does not depend on how. This is a deliberate choice: read what the task needs. If a later stage involves the store directly, the candidate can read it then. Reading everything at the start costs time and often fills memory with details that never matter.

Saying the plan in terms of tools

The plan in this round is notable for naming which tool does which job: validation by hand, condition by hand, tests by assistant. This tells the interviewer that the candidate thinks about the assistant as one tool among several, used where it saves time. It also makes the round easier to follow, because each later action matches a line in the plan.

A short version of the orientation

If time were tighter, the orientation could be compressed to about five minutes with three lines: the rule said back with the half open boundary, the test map with gaps and a one sentence plan. The clarifying questions would come as the candidate reached each piece. Five minutes is the floor; below that, the risk of a misread rule rises sharply.

Practising orientation on this task

Before reading on, try orienting on this task yourself from the README alone. Set a timer for eight minutes, list the clauses, the boundary, the gaps and your questions and write a three line plan. Then compare with the transcript. Most readers miss at least one of the gaps or the input question.

Whatever you miss on this task is likely what you would miss in a real round, so it is worth knowing now. Note it and watch for it in the next two worked rounds.

Then read on.

Take your time.

Reading carefully now saves minutes later.

Name the interval rule first

Half-open or closed decides every comparison in a booking task. Saying it back before any code, with the back to back case as the boundary, prevents the most common bug.