Low-level design
Object-oriented design for interviews: the framework, design principles and patterns, concurrency, and problem breakdowns you can practice in the code runner.
Object-oriented design for interviews: the framework, design principles and patterns, concurrency, and problem breakdowns you can practice in the code runner.
16 write-ups
| Title | Difficulty |
|---|---|
| Design Patterns: Which One When A map of the design patterns that matter in LLD interviews (creational, structural, behavioral), the symptom each one fixes, a worked example and when to use none. | |
| Strategy Pattern How the Strategy pattern replaces if/else chains on a type with swappable classes, with a ride fare example, a parking lot walkthrough, variations and when not to use it. | |
| Adapter Pattern How the Adapter pattern wraps third-party APIs, such as payment providers, behind an interface your code owns, with a worked checkout example, variations and when not to use it. | |
| Builder Pattern How the Builder pattern assembles objects with many optional parts into validated, immutable results, with an email example, a query builder walkthrough, Python alternatives and when not to use it. | |
| Chain of Responsibility Pattern How the Chain of Responsibility pattern passes a request along a line of handlers, with an expense approval chain, an HTTP middleware walkthrough, variations and when not to use it. | |
| Command Pattern How the Command pattern turns actions into objects you can undo, redo, queue and log, with a text editor undo/redo example, a smart home scheduler walkthrough, variations and when not to use it. | |
| Composite Pattern How the Composite pattern lets you treat one object and a group of objects the same way, with a files and folders example, a menu with combo meals, variations and when not to use it. | |
| Decorator Pattern How the Decorator pattern stacks extra behavior on an object without subclassing every combination, with a pizza toppings example, a notifier walkthrough, variations and when not to use it. | |
| Facade Pattern How the Facade pattern gives callers one simple entry point over several subsystems, with an order checkout example, the orchestrator class in LLD problems, variations and when not to use it. | |
| Factory Pattern How factories move the choice of which class to create into one place, covering the simple factory, the factory method and the abstract factory, with a notification walkthrough and when not to use them. | |
| Iterator Pattern How the Iterator pattern separates walking a collection from storing it, with a playlist example, a paged API walkthrough, custom tree traversal, variations and when not to use it. | |
| Observer Pattern How the Observer pattern lets an object announce changes to listeners it doesn't know, with an inventory example, an auction walkthrough, an in-process event bus and its pitfalls. | |
| Proxy Pattern How the Proxy pattern puts a stand-in with the same interface in front of a real object to load it lazily, check access or cache results, with a document store example and when not to use it. | |
| Singleton Pattern How the Singleton pattern guarantees one instance, how to make lazy creation thread safe (locks, double-checked locking, the holder idiom), and why passing one instance in is usually better. | |
| State Pattern How the State pattern turns an object with modes into one class per state, with a vending machine example, an ATM walkthrough, transition tables for order lifecycles and when not to use it. | |
| Template Method Pattern How the Template Method pattern fixes the steps of an algorithm in a base class and lets subclasses fill in the parts that vary, with a board game loop, a job runner walkthrough, variations and when not to use it. |