Design a Multi-Level Parking Garage With Different Spot Sizes

Last updated: November 29, 2026

Quick Overview

Design the object model for a parking garage at an Amazon office campus with several levels, spot sizes (motorcycle, compact, large) and vehicle types (motorcycle, car, van). Support parking a vehicle in the smallest suitable free spot, unparking by ticket, and reporting free spots per size.

Amazon
Software Engineering Fundamentals
Software Engineer
Amazon
November 29, 2026
Software Engineer
Onsite
Software Engineering Fundamentals
Medium

0

0

0 solved


Design the object model for a parking garage at an Amazon office campus with several levels, spot sizes (motorcycle, compact, large) and vehicle types (motorcycle, car, van). Support parking a vehicle in the smallest suitable free spot, unparking by ticket, and reporting free spots per size.

A frequently used Amazon onsite low-level design question. The interviewer looks for clean entities, a fit rule that is easy to change, O(1) or O(log n) spot allocation rather than scanning every spot, and attention to concurrency at the gates.

What the Interviewer Expects
  • Identify entities: Garage, Level, Spot, Vehicle, Ticket
  • Encode which vehicle sizes fit which spot sizes
  • Allocate in better than linear time using free lists per size
  • Issue and resolve tickets
  • Address concurrency when two gates park at once
Key Topics to Cover
Low-Level Design
OOP
Data Structures
Concurrency
Enums
How to Approach This
  1. Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
  2. Choose data structures based on access patterns, not familiarity.
  3. Prefer immutable data and message passing over shared mutable state for concurrency.
  4. Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
  • How would you add EV charging spots?
  • How would you compute fees by duration with different rates?
  • How would you make allocation prefer the lowest level or nearest elevator?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Vehicle sizes are ordered: MOTORCYCLE < CAR < VAN, and spot sizes the same. A vehicle fits any spot of its size or larger; prefer the smallest fitting size, then the lowest level and spot number. Unpa...

High-Level Design
  • Size IntEnum for both vehicles and spots so 'fits' is spot.size >= vehicle.size.
  • Spot(level, number, size); Ticket(id, plate, spot, entry_time).
  • Garage keeps, per spot size, a min-heap...

Submit Your Answer
Markdown supported