LLD Hub
Problems·Parking Lot System
L2 · Easy

Parking Lot System

Problem

Design a parking lot system that can handle multiple floors, different vehicle types, and manage parking slots efficiently.

Requirements

  • Support multiple vehicle types: Bike, Car, Truck
  • Support multiple floors with configurable slot counts per floor
  • Allocate nearest available slot to incoming vehicle
  • Free up slot when vehicle exits
  • Generate a ticket on entry and calculate fee on exit
  • Support different pricing per vehicle type

Constraints

  • A slot can only hold one vehicle at a time
  • Bikes take small slots, Cars take medium, Trucks take large
  • Pricing: Bike ₹20/hr, Car ₹40/hr, Truck ₹80/hr
✓ Saved