This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/system-design-primer-primer).
This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/system-design-primer-primer).
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
# Design a parking lot
# Design a parking lot
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
## Constraints and assumptions
## Constraints and assumptions
* What types of vehicles should we support?
* What types of vehicles should we support?
* Motorcycle, Car, Bus
* Motorcycle, Car, Bus
* Does each vehicle type take up a different amount of parking spots?
* Does each vehicle type take up a different amount of parking spots?
* Yes
* Yes
* Motorcycle spot -> Motorcycle
* Motorcycle spot -> Motorcycle
* Compact spot -> Motorcycle, Car
* Compact spot -> Motorcycle, Car
* Large spot -> Motorcycle, Car
* Large spot -> Motorcycle, Car
* Bus can park if we have 5 consecutive "large" spots
* Bus can park if we have 5 consecutive "large" spots