Command Palette

Search for a command to run...

PHASE 15Intermediate ~7 min· topic 2 of 5

Template — The 13-Part LLD Answer

In one line

The LLD analogue: requirements → actors → use cases → entities → responsibilities → relationships → interfaces → SOLID → patterns → extensibility → concurrency → code → tests.

0/5 · 0%

Key ideas

  1. 01

    In plain words: the same idea as the HLD recipe card, but for code-level problems like Parking Lot or Splitwise. 13 steps, always in the same order, so you never freeze up staring at a blank whiteboard.

  2. 02

    1 · Requirements — written, with edge cases; the 3.1 requirement drill.

  3. 03

    2 · Actors — who uses it (parking attendant, driver, system).

  4. 04

    3 · Use cases — the 4–6 core flows in one line each.

  5. 05

    4 · Entities — nouns with identity + state (3.2).

  6. 06

    5 · Responsibilities — which class owns which behavior (3.3).

  7. 07

    6 · Relationships — multiplicities + ownership: 1:1/1:N/N:N, composition/aggregation (1.3).

  8. 08

    7 · Interfaces — the seams every extension plugs into (1.4/3.4).

  9. 09

    8 · SOLID — the violations your design explicitly avoids (1.2).

  10. 10

    9 · Patterns — the pattern(s) chosen for a stated design problem (Phase 2).

  11. 11

    10 · Extensibility — 'what changes when a new X arrives' walkthrough (3.4).

  12. 12

    11 · Concurrency — shared-state audit + the atomic operation choice (Phase 5).

  13. 13

    12 · Code — production-quality implementation, not a script.

  14. 14

    13 · Test cases — unit tests for the invariants + edge cases; the 3.3 testability payoff.

Code & diagrams

lld-template.mdmarkdown

The LLD checklist — same idea, different lens.

1. Requirements
2. Actors
3. Use cases
4. Entities
5. Responsibilities
6. Relationships      (multiplicity + ownership)
7. Interfaces         (the seams)
8. SOLID              (violations avoided)
9. Patterns           (chosen for a problem, not a vibe)
10. Extensibility     (what changes for a new variation)
11. Concurrency       (shared-state audit + atomic ops)
12. Code              (production quality)
13. Test cases        (invariants + edges)

Explain without notes

01

Run the 13 parts on 'design splitwise' without notes: entities → responsibilities → concurrency → tests.

Practice

01

Two timed rounds: Parking Lot (20 min) and Notification System (30 min) — grade yourself against the checklist.

Trade-offs

  • ↔

    Skipping concurrency or tests on an LLD is the classic way to lose the round at 4+ YOE.

Completion checklist

  • I can deliver the 13-part LLD from memory on any prompt.

Back to phase