Design a parking lot
The interviewer asks you to design the software for a parking lot with several levels. Picture the office at the entrance, with a pile of numbered bay cards for each floor and size of bay. The attendant hands you the top card from the right pile, and it goes back on the pile when you leave.
It is also asked as "design a parking garage", and the closest other case study is parcel lockers, which hands out lockers by size in the same way. Everyone knows the domain, so the whole round goes on design: who owns which state, where the price lives, and who gets the last spot.
Below is a full 45-minute round on the LLD framework. You are the candidate. At each Guess before you read on, stop and answer first. The full runnable project, with its tests, is a download in Java, JavaScript and Python.
Run the full project
This design as a project you can run, with its tests and a demo. You only need Java 21, Node 24 or Python 3.13. The README says how to run it.
Step 1 · Clarify the requirements and cut the scope
Minutes 0–5 · How this step works
Interviewer: Design a parking lot.
You: Which vehicles come in, and what sizes of spot are there?
Interviewer: Motorcycles, cars and vans. Spots are small, regular or large.
You: Can a vehicle take a bigger spot when its own size is full?
Interviewer: Yes. A motorcycle can take a regular spot, and a car a large one. Never the other way round.
You: How is the price set, and is taking the payment part of this?
Interviewer: Each vehicle type has an hourly rate, and every hour started counts. Just return the amount.
You: How big is the lot, and what does "full" mean?
Interviewer: Five levels of about a thousand spots. Full means no spot fits, so the gate turns the vehicle away.
You: Then I'll build park, which returns a ticket, and leave, which returns the fee. A vehicle can't park twice, and a used ticket is refused. Payments, reservations and display boards are out. OK?
Interviewer: Good.