Design a Parking Lot
Medium · Low-Level Design · about 45 minutes
Asked at Amazon, Microsoft, Uber, Google.
Design the classes for a multi-level parking lot. It has spots of different sizes (motorcycle, compact, large), issues tickets on entry, assigns a suitable spot, and charges by duration on exit.