DesignTheSystem/dev

17 graded code design problems

Low-Level Design (LLD) interview problems

Practise object-oriented design and machine coding interviews. Write real TypeScript classes against a clean interface, pass hidden edge-case tests, then adapt your design to a realistic change request.

Hidden tests50 ptsCore behaviour & edge cases
Change request20 ptsExtensibility with minimal edits
Design checks15 ptsStatic structure & coupling rules
AI review15 ptsResponsibilities & naming

Start with the worked example

All low-level design problems (16)

EASY 16 tests

Design Parking Lot

Park vehicles in the right size of spot, issue tickets and charge on exit.

Modelling objects, matching rules and a pricing policy

EASY 12 tests

Design Tic-Tac-Toe (N × N)

Any board size, with a win check that only looks around the last move.

Checking only what a move can change

EASY 12 tests

Design Vending Machine

Take coins, sell products, give change, and refuse what a state does not allow.

States and the actions each state allows

EASY 12 tests

Design Snake and Ladder

A board game where the board, the players and the rules for a turn are separate pieces.

Separating the board, the players and the turn rules

EASY 13 tests

Design Library System

Lend books to students and faculty with different limits, and charge fines for late returns.

Policies that differ by member type

MEDIUM 12 tests

Design LRU Cache

A fixed-size cache that throws out the least recently used entry when full, with every operation in constant time.

Choosing data structures for constant-time operations

MEDIUM 12 tests

Design Rate Limiter

Two rate-limiting algorithms behind one interface, so callers can swap them.

One interface, several algorithms

MEDIUM 11 tests

Design Game Leaderboard

Add points, show the top players and anyone's rank, with ties handled consistently.

Ranking with ties, and keeping reads cheap

MEDIUM 11 tests

Design Key-Value Store with Expiry

An in-memory store with per-key expiry, later with nested transactions.

Time-based expiry, then layered transactions

MEDIUM 13 tests

Design Expense Sharing (Splitwise)

Split shared expenses several ways, track who owes whom, and suggest the fewest payments to settle up.

Strategies for one operation, and exact money in whole cents

MEDIUM 11 tests

Design Digital Wallet

Deposits, withdrawals and transfers that are safe to retry, with a full history.

Idempotent money operations and a ledger

MEDIUM 13 tests

Design Movie Ticket Booking

Hold seats for a few minutes, confirm or release them, and never sell one seat twice.

Temporary holds that expire, and seat state

MEDIUM 12 tests

Design Calendar Scheduling

Book meetings without double-booking anyone, and find free time for a group.

Interval logic: overlaps, merging and gaps

MEDIUM 11 tests

Design Job Scheduler

Run jobs when they are due, in a fixed order, with cancelling and (later) repeating jobs.

Priority queues and a clock you control

HARD 13 tests

Design Elevator System

Several elevators answering hall calls, moving one floor per step and serving stops in their direction of travel.

A dispatch strategy and a step-by-step state machine

HARD 14 tests

Design Chess Move Rules

Generate and play legal piece moves, with each kind of piece owning its own movement.

Polymorphism: each piece knows how it moves