LLD (Low-Level Design) Interview Questions
Low-level design rounds ask you to turn a small problem (a parking lot, an elevator, a rate limiter) into clean classes and interfaces. Interviewers look for sensible responsibilities, the right design pattern used for the right reason, extensibility without rewrites, and code that is easy to test.
These questions cover the design patterns (creational, structural, behavioural) and the principles behind them, with code. Learn when a pattern helps and when it is over-engineering; that judgement is what gets scored.
Questions
- What is the Singleton pattern and how do you implement it correctly?
- Explain the Factory Method pattern.
- What is the Abstract Factory pattern and how does it differ from Factory Method?
- Explain the Builder pattern and when to use it.
- What is the Prototype pattern?
- Explain the difference between the main Creational patterns (when to pick which).
- Explain the Adapter pattern.
- What is the Bridge pattern?
- Explain the Composite pattern.
- Explain the Decorator pattern.
- Explain the Facade pattern.
- Explain the Flyweight pattern.
- Explain the Proxy pattern and its common variants.
- Compare Adapter, Decorator, Facade, and Proxy — they all "wrap".
- Explain the Strategy pattern.
- Explain the Observer pattern.
- Explain the Command pattern.
- Explain the Template Method pattern.
- Explain the Chain of Responsibility pattern.
- Explain the State pattern.
- Explain the Iterator pattern.
- Explain the Mediator pattern.
- Explain the Memento pattern.
- Explain the Visitor pattern.
- Explain the Interpreter pattern.
- What is the difference between Strategy and State patterns (they look identical)?
- What are the three GoF categories and how do you choose a behavioral pattern?
- What are the SOLID principles?
- Explain the Single Responsibility Principle with a refactor example.
- Explain the Open/Closed and Liskov Substitution principles.
- Explain the Interface Segregation and Dependency Inversion principles.
- What is Dependency Injection and how does it relate to IoC?
- Explain the MVC architectural pattern.
- Explain the Repository pattern.
- What is the difference between DAO and Repository patterns?
- Explain the DTO pattern and why it's used.
- What is the Unit of Work pattern?
- What is the difference between design patterns and architectural patterns?
- What is the Sidecar pattern?
- What is the Ambassador pattern and how does it differ from Sidecar?
- Explain the Circuit Breaker pattern at the architecture level.
- What is the Master-Slave (Primary-Replica) architecture?
- How do you route reads to replicas and writes to the master?
- What is Leader Election in distributed systems?
- Explain the Load Balancer pattern and its strategies.
- What is the Reverse Proxy pattern (vs Forward Proxy)?
- Explain Database Sharding (partitioning) as a pattern.
- Explain the Rate Limiter / Throttling pattern.
- Explain the Retry pattern with backoff and idempotency.
- Explain the Publish-Subscribe (Pub/Sub) pattern.
- What is the Service Registry / Discovery pattern?
- Explain the Cache-Aside (Lazy Loading) pattern.
- What is the Layered (N-Tier) architecture pattern?
- Explain the Strangler Fig pattern for modernization.
- Explain the Bulkhead pattern at the architecture level.
- Explain the Event-Driven Architecture (EDA) pattern.
- What is the Client-Server vs Peer-to-Peer architecture?
- How do you choose the right architecture/distributed pattern (summary)?
Related
Frequently asked questions
What is the difference between LLD and HLD?
High-level design is about the whole system: services, databases, queues, scale. Low-level design is about the code inside one component: classes, interfaces, patterns and their relationships.
Which design patterns are asked most often?
Singleton, Factory, Builder, Strategy, Observer, Decorator and State come up most, along with the SOLID principles.
How do I practise LLD?
Pick a classic problem, list the requirements, sketch the classes and interfaces, then code the core flow. Compare with the answers here and notice what you would change.