LLD Case Studies in Low-Level Design

Lessons in this section

  1. Parking Lot

    Design a parking lot: spot sizes, the smallest spot that fits, tickets and fees, then build it against a hidden test suite.

  2. Elevator

    Design an elevator that serves floors fairly: time in steps, a set of requests, and the elevator algorithm, tested step by step.

  3. LRU Cache

    Build a least-recently-used cache with O(1) get and put, using a Map that remembers order, and check it against a speed test.

  4. Rate Limiter

    Build a per-user token bucket rate limiter with lazy refill and an injectable clock, tested with a fake clock.

  5. Splitwise

    Design an expense splitter: equal, exact and percent splits in whole rupees, net balances, and settling up with few payments.

  6. Library System

    Design a library: copies, loans with due days and fines, a three-book limit and a fair waiting list, built against hidden tests.

  7. Vending Machine

    Rebuild a vending machine with the State pattern: coins, change, sold-out items and refunds, with hidden tests and a design check.

  8. Seat Booking

    Design cinema seat booking like BookMyShow: hold then confirm, expiring holds, all-or-nothing groups and a lock tested in every order.