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

Scenario
Saturday mall rush: entry gates disagree with payment kiosks on whether level 3 is full because spot counts updated eventually. Two cars can both be told to park in the same space unless assignment is atomic. The interview still needs concurrency on spots, a clear ticket lifecycle, and idempotent payment—at scale you add multi-entry coordination and reconciliation between displays and truth.
Design a parking lot system that manages vehicle entry, spot assignment by type, hourly or dynamic pricing, and exit payment. At interview scope, start with clear entities and invariants; when the interviewer asks about scale or multiple gates, show atomic spot assignment and idempotent payment so retries never create duplicate tickets or charges.
You should support vehicle entry and exit, spot types that match vehicle types, ticketing, payment, and availability displays. Be ready to explain concurrency control on spots, how the ticket state machine behaves under gate retries, and how fee calculation stays fair when clocks and networks are messy.
Constraints
Enter/exit, assign spot by vehicle and spot type, hourly or dynamic pricing, payment, availability display, optional reservations
No double booking of spots, entry gate response under ~2 seconds, payment idempotent on retry, audited attendant overrides
Single lot with thousands of spots and multiple entry lanes; multi-lot city scale shards by `lot_id`
Stages ahead
Log in to start practicing
Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.