System design · Low-level design

Design the classes, then prove they work

Low-level design is about classes and clean seams. Learn the few ideas behind every answer, read the classics, then write the code yourself.

  • 6 foundations · 3 h
  • 10 classic questions
  • 14 coding exercises
  1. 1ClarifyPin down the use cases and what is out of scope before drawing a class.
  2. 2ModelNouns become classes, verbs become methods, and each class owns one job.
  3. 3ExtendShow where a new rule plugs in without editing what already works.
  4. 4TestWalk one scenario, then the edge cases, with a clock you can control.

1. Foundations

  1. 01 25 min

    From Requirements to Classes

    Every LLD answer starts the same way: read the requirements, pull out the nouns and verbs, and decide who owns which responsibility.

    Foundation 1
  2. 02 30 min

    SOLID, with Code That Breaks

    Five principles that explain why a design survives the next requirement. Each one is shown as code that hurts, then code that doesn't.

    Foundation 2
  3. 03 25 min

    Swap Behaviour: Strategy and Decorator

    Replace an if/else ladder with an object you can swap, and stack extra rules around it without editing the original.

    Foundation 3
  4. 04 25 min

    State Machines and Observers

    Model an object that behaves differently in each phase as a state machine, and let other objects react to its changes without being wired into it.

    Foundation 4
  5. 05 25 min

    Factory, Builder, Singleton and Command

    Four patterns that show up constantly, and the honest answer to when each one is overkill.

    Foundation 5
  6. 06 20 min

    The LLD Interview Playbook

    A repeatable 45-minute structure, what interviewers actually score, and the mistakes that cost points.

    Foundation 6

2. The classics, answered in full

3. Code it yourself

Write the class in JavaScript or Python and submit against hidden tests. A wrong submission unlocks the step-by-step solution.