Mock Interviewer
Ask Coach
Tap a question to start, or type your own below.
Parking Lot System Design
Visual Problem Diagram

Scenario
Picture a busy mall garage on a Saturday afternoon, with several entry lanes and a ticket machine at each one. Two cars reach two different lanes at the same moment, and each machine looks at its list of free spots and offers Spot 12 to both drivers. One driver parks and the other finds a car already there. The software that decides which spot each car gets, keeps track of every stay, and charges the driver when the car leaves is called a parking lot system, and it has to make sure one spot is never given to two cars and one stay is never charged twice.
Clarify this problem here, or open Pathway Coach if you want a prep plan first.
This problem asks you to design a parking lot system, which is the software behind the gates of a garage. When a car arrives, the system decides which spot the car gets and hands the driver a ticket. While the car is parked, it keeps track of the stay. When the car leaves, it works out the fee, takes the payment, opens the gate, and makes the spot available to the next car. A sign near the entrance shows how many spots are left, and a driver may also be able to reserve a spot ahead of time.
In the interview you need to explain five things. First, how two entry gates avoid handing out the same spot. Second, how a ticket moves from entered, to paid, to closed, even when a gate sends the same request twice. Third, how the fee is worked out from the entry time, including a short grace period. Fourth, how the spots-left sign can be a few seconds behind while the gate still tells the truth. Fifth, how a second tap on Pay does not charge the card twice. A class diagram of every noun in the garage can stay thin.
Constraints
A vehicle enters and later leaves. It gets a spot that fits its type. The fee can be hourly or can rise with demand. The driver pays. A sign shows how many spots are left. A reservation ahead of time is optional.
Two cars never receive the same spot. The gate answers in under about 2 seconds, so the line of cars keeps moving. Paying again after a timeout does not charge the card twice. An attendant's override is written down.
One garage holds thousands of spots and has several entry lanes. Those lanes are where the Saturday rush hits. A city of garages splits the work by garage so one mall does not lock every other lot.
Stages ahead
Not ready to design yet?
Try the free Coach trial — ask how to prep, what to practice first, or how InterviewCrafted works. Sign in when you want to start this problem.
Log in to start practicing
Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.
Want full access now? View Pro pricing