Machine coding track

LLD Fundamentals

What interviewers actually grade in a machine-coding round: not clever algorithms, but how well you organise code under time pressure. SOLID, all 23 Gang of Four patterns, the four non-GoF ones that keep turning up, then concurrency, state machines and testing.

  • 40 lessons in 4 tracks
  • ~8h 9m of reading
  • 19 free to read

The 4 tracks

The patterns run Creational, then Structural, then Behavioral — the order a catalogue should. That is not the order to learn them in: the reading order below the tracks is.

The RoundTrack 1 · 4 lessons · about 28m
  1. Machine Coding Round ~8 min
  2. The 5-Minute Design Sketch ~6 min
  3. UML Class Diagrams ~7 min
  4. Over-Engineering and YAGNI ~7 min
PrinciplesTrack 2 · 5 lessons · about 1h 2m
  1. SOLID Principles ~13 min
  2. Inheritance vs Composition ~7 min
  3. Immutability and Equality ~19 min
  4. Dependency Injection ~17 min
  5. Exception Handling Pro ~6 min
Design PatternsTrack 3 · 26 lessons · about 5h 39m
  1. Factory Pattern Pro ~8 min
  2. Abstract Factory ~16 min
  3. Builder Pattern Pro ~7 min
  4. Prototype Pattern Pro ~19 min
  5. Singleton Pattern Pro ~6 min
  6. Object Pool Pattern Pro ~18 min
  7. Adapter Pattern ~16 min
  8. Bridge Pattern Pro ~20 min
  9. Composite Pattern Pro ~6 min
  10. Decorator Pattern Pro ~7 min
  11. Facade Pattern ~10 min
  12. Flyweight Pattern Pro ~20 min
  13. Proxy Pattern ~18 min
  14. Chain of Responsibility ~12 min
  15. Command Pattern Pro ~6 min
  16. Interpreter Pattern Pro ~20 min
  17. Iterator Pattern ~13 min
  18. Mediator Pattern ~17 min
  19. Memento Pattern Pro ~19 min
  20. Observer Pattern Pro ~6 min
  21. State Pattern Pro ~7 min
  22. Strategy Pattern ~8 min
  23. Template Method Pattern Pro ~6 min
  24. Visitor Pattern Pro ~22 min
  25. Repository Pattern ~14 min
  26. Specification Pattern Pro ~18 min
Advanced TopicsTrack 4 · 5 lessons · about 1h 0m
  1. Concurrency Pro ~7 min
  2. State Machines Pro ~8 min
  3. Money Handling Pro ~7 min
  4. Collections and Complexity ~18 min
  5. Testing in Machine Coding ~20 min

The lessons cover the round itself, the principles you are graded against, all 23 Gang of Four design patterns plus the four non-GoF patterns that keep turning up in interviews (Repository, Specification, Object Pool, Dependency Injection), and the advanced topics — concurrency, state machines, money, collections and testing.

Each topic above is a standalone guide with code in Java, C++, and Python, Mermaid diagrams, and links to the LLD problems that use it.


The list above is ordered for reference — the patterns run Creational, then Structural, then Behavioral, the way a catalogue should. That is not the order to learn them in.

If you are starting from scratch, follow this path instead:

  1. Machine Coding Round — understand the format
  2. SOLID Principles — the evaluation criteria
  3. Strategy Pattern — the most common pattern
  4. State Pattern — the second most common
  5. The 5-Minute Design Sketch — how to start
  6. Try Parking Lot (uses Strategy + Factory)
  7. Try Vending Machine (uses State)
  8. Dependency Injection and Testing in Machine Coding — the pair that decides whether an interviewer can see your design work
  9. Pick up remaining patterns as you encounter them in problems

Three lessons are worth reading out of order the moment they bite. Immutability and Equality is the one most pattern lessons lean on. Collections and Complexity is where an accidental O(n) comes from. Over-Engineering and YAGNI is the counterweight to a catalogue this size — knowing 27 patterns is only an advantage if you can also say which ones a problem does not need.

After that, move to the 40 LLD Problems — each one references the fundamentals it uses.