A blog series
Design Patterns and Low-Level Design (OOD) for Interviews
Object-oriented design interviews and the design patterns behind them: SOLID, creational, structural and behavioural patterns, the patterns you already use, and worked class designs for a parking lot, LRU cache, vending machine, elevator, blackjack, chat server, rate limiter and notifications. All examples are TypeScript that was run.
- Started
- 2026
- Lessons
- 10
- Reading
- ~4 h
Contents
Every lesson has the same steps: what it is, how it works, a real example, common mistakes, then interview questions with answers you can say out loud.
- Lesson 00How to Run a Low-Level Design Interview, and SOLID in Plain WordsThe five-step routine, composition over inheritance, SOLID with before and after examples, and ASCII UML.20 min
- Lesson 01Creational Patterns: Factory, Builder, Singleton and FriendsFactories, builder, the module singleton and its traps, prototype, and dependency injection as the practical replacement.20 min
- Lesson 02Structural Patterns: Adapter, Decorator, Facade, Proxy and CompositeThe intent of each pattern, how to tell them apart, and the JavaScript Proxy object.18 min
- Lesson 03Behavioural Patterns: Strategy, Observer, Command, State and Chain of ResponsibilityThe five main behavioural patterns plus iterator and template method, with runnable TypeScript.20 min
- Lesson 04Patterns You Already Use: Middleware, Hooks, Dependency Injection, and Anti-PatternsExpress and Koa middleware, EventEmitter, Redux, React, and the anti-patterns that spoil designs.20 min
- Lesson 05Design a Parking LotBest-fit and nearest-spot strategies, hourly pricing with a daily cap, and a double-booking race fixed with compare-and-set.28 min
- Lesson 06Design an LRU Cache and a Hash MapChaining and resize, a map plus doubly linked list, TTL, and stampede control.30 min
- Lesson 07Design a Vending Machine and an Elevator (State Machines)The State pattern versus a transition table, and elevator scheduling compared by floors travelled.30 min
- Lesson 08Design a Deck of Cards, Blackjack and a Chat Server (Class Models)Ace scoring, stacked-deck tests, and a chat server built with the observer pattern.30 min
- Lesson 09Design a Rate Limiter and a Notification Service (Class Models)Token bucket and window limiters, channel strategy, backoff with jitter, and idempotency.32 min
Glossary
16 terms used in this series. Inside any lesson, hover or tap a dotted term to see its meaning without leaving the page. Browse all terms →