# Classic LLD Case Studies

> Practise the most frequently asked designs: parking lot, library management, vending machine, tic-tac-toe or snake and ladder, and an elevator system. Free...

Canonical: https://www.internhack.in/roadmaps/tracks/cs-fundamentals/lld-classic-case-studies
Last updated: 2026-11-28

Practise the most frequently asked designs: parking lot, library management, vending machine, tic-tac-toe or snake and ladder, and an elevator system.

Intermediate · about 12 hours · difficulty 3/5

Learn first: [How to Approach an LLD Interview](https://www.internhack.in/roadmaps/tracks/cs-fundamentals/lld-approach)

A small set of prompts covers most LLD interviews. Designing each one yourself, then comparing with reference solutions, teaches you reusable building blocks.

### The core set and what each teaches

- **Parking lot**: entity modelling, Strategy for spot allocation and pricing, concurrency on spot assignment, and the Factory pattern for vehicles.
- **Library management**: users, books vs book copies (a key distinction), reservations, fines, and search. Teaches separating a catalogue item from a physical item.
- **Vending machine or ATM**: the **State** pattern (Idle, HasMoney, Dispensing) and Chain of Responsibility for dispensing notes.
- **Tic-tac-toe, Snake and Ladder, Chess**: game loops, board and player abstractions, win checking, and keeping rules separate from the board so you can change them. Chess adds per-piece movement via polymorphism.
- **Elevator system**: request scheduling (a SCAN-like algorithm, which you saw in disk scheduling), states per elevator, and a controller that assigns requests. Great for showing Strategy and State together.
- **Logger or notification service**: Chain of Responsibility for levels, Observer for subscribers, Singleton for the logger instance.

### How to practise each one

- Timebox 45 minutes: requirements, class diagram, then code the core classes and one flow.
- Compare with a reference solution and note differences in responsibilities, not naming.
- Revisit a week later and add one extension (EV charging, multiple elevators, undo in games).

### What interviewers look for

Clear single-responsibility classes, interfaces at the points of change, correct relationships, and working code for at least the main flow.

Good enough to move on: you can design and partially code any three of these from a blank page within the time limit, and explain the pattern choices.

## Key concepts

- **Parking lot**
- **Library management system**
- **Vending machine and ATM**
- **Tic-tac-toe and Snake and Ladder**
- **Elevator system**
- **Logger and notification service**
- **Chess**

## Mini project

Implement a working parking lot and an elevator system in your DSA language with a simple CLI: multiple floors and spot types, pluggable pricing, and an elevator controller that serves requests using a SCAN-style strategy, with unit tests for the core flows.

## Check yourself

In a library system, why should Book and BookItem be separate classes, and which one does a reservation reference?

## Free resources

- [awesome-low-level-design (case studies)](https://github.com/ashishps1/awesome-low-level-design) (GitHub)
- [Grokking the Object Oriented Design Interview notes](https://github.com/tssovi/grokking-the-object-oriented-design-interview) (GitHub)

Previous: [How to Approach an LLD Interview](https://www.internhack.in/roadmaps/tracks/cs-fundamentals/lld-approach) · Next: [Advanced LLD Case Studies](https://www.internhack.in/roadmaps/tracks/cs-fundamentals/lld-advanced-case-studies)

## More in Low-Level Design

- [How to Approach an LLD Interview](https://www.internhack.in/roadmaps/tracks/cs-fundamentals/lld-approach)
- [Classic LLD Case Studies](https://www.internhack.in/roadmaps/tracks/cs-fundamentals/lld-classic-case-studies)
- [Advanced LLD Case Studies](https://www.internhack.in/roadmaps/tracks/cs-fundamentals/lld-advanced-case-studies)
- [The Machine Coding Round](https://www.internhack.in/roadmaps/tracks/cs-fundamentals/machine-coding-round)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [CS Fundamentals and Placement Prep Roadmap](https://www.internhack.in/roadmaps/tracks/cs-fundamentals)
