LLD: Track C
The eight designs
Eight 45-minute LLD problems, each with what to build, the one hard part, and the skill it trains.
This is the practice half of the LLD track. Eight designs, 45 minutes each, one a week from week 4.
Two rules make it work.
- Alternate the mode. Odd sessions are sketch-only on paper or a whiteboard. Even sessions are code-the-core, with running code.
- Re-attempt a failed design 2 weeks later. A design that fails self-score twice joins the retry list for mock season.
For each one, build the part below, name the hard part out loud before you start, and score the result against the five-check rubric.
Parking lot
- Build: vehicle entry and exit, slots by vehicle type, billing at the gate.
- Hard part: billing for a stay that crosses midnight or a vehicle that changes slot type.
- Trains: state modelling and clean boundaries around the slot.
Splitwise
- Build: balances between people, and a simplify-debts pass that settles the group.
- Hard part: the simplify-debts graph, without losing or inventing money.
- Trains: graph reasoning and ledger correctness.
Rate limiter
- Build: one limiter. Fixed window, sliding log or token bucket. Pick one, justify it, then code it.
- Hard part: committing to one algorithm and defending it under time pressure.
- Trains: judgement and honest trade-offs.
Logger
- Build: an in-memory ring buffer with an asynchronous flush, safe for concurrent writers.
- Hard part: flushing without dropping a line while writers keep coming.
- Trains: concurrency and backpressure.
Food delivery pipeline
- Build: order states and rider assignment.
- Hard part: keeping the state machine honest when an order is cancelled mid-delivery.
- Trains: state machines and transition guards.
Ticket booking with seat hold
- Build: seat selection with a hold, then a confirm or release.
- Hard part: two users on the last seat, and choosing optimistic or pessimistic locking on seats.
- Trains: locking and conflict handling.
Elevator
- Build: a scheduling algorithm with direction states.
- Hard part: direction states that do not starve a floor.
- Trains: algorithms under physical constraints.
In-memory KV store with TTL and LRU
- Build: get, put and delete, with TTL expiry and LRU eviction. This one also prepares you for Logsmith.
- Hard part: expiry and eviction together, under concurrent access.
- Trains: data structures and locking in one design.
When a design runs end to end, the next step is the four timed machine-coding runs, where the clock and the demo are real.