Low-Level Design Interview Questions
The machine-coding round — modelling a domain in classes, SOLID applied with judgement, design patterns without over-applying them, concurrency in design, and the classic problems: parking lot, elevator, rate limiter, LRU cache.
Showing 1–20 of 100
#1What is encapsulation and what does it actually buy you?
#2When should you use composition instead of inheritance?
#3What is the Liskov Substitution Principle and what does violating it look like?
#4What is the difference between an abstract class and an interface, and when do you use each?
#5What is polymorphism and how does it change how you write code?
#6What is the difference between an anemic domain model and a rich one?
#7What is the difference between coupling and cohesion?
#8Why should you favour immutability, and what does it cost?
#9What is the difference between a value object and an entity?
#10What does "program to an interface, not an implementation" actually mean in practice?
#11What is the Law of Demeter and is it worth following?
#12How do you decide what should be a class?
#13Explain the Single Responsibility Principle with a concrete example.
#14What is the Open/Closed Principle and how do you achieve it?
#15What is the Interface Segregation Principle?
#16What is Dependency Inversion, and how does it differ from dependency injection?
#17Are the SOLID principles always worth following?
#18How do SOLID principles relate to testability?
#19What is the difference between DRY and premature abstraction?
#20What is the Dependency Injection container doing, and do you need one?
Showing 1–20 of 100
Ask Aria about Low-Level Design
Sign in to chat with Aria
All 100 Low-Level Design questions at a glance
- What is encapsulation and what does it actually buy you?(Easy)
- When should you use composition instead of inheritance?(Medium)
- What is the Liskov Substitution Principle and what does violating it look like?(Medium)
- What is the difference between an abstract class and an interface, and when do you use each?(Easy)
- What is polymorphism and how does it change how you write code?(Easy)
- What is the difference between an anemic domain model and a rich one?(Hard)
- What is the difference between coupling and cohesion?(Medium)
- Why should you favour immutability, and what does it cost?(Medium)
- What is the difference between a value object and an entity?(Medium)
- What does "program to an interface, not an implementation" actually mean in practice?(Medium)
- What is the Law of Demeter and is it worth following?(Medium)
- How do you decide what should be a class?(Medium)
- Explain the Single Responsibility Principle with a concrete example.(Easy)
- What is the Open/Closed Principle and how do you achieve it?(Medium)
- What is the Interface Segregation Principle?(Medium)
- What is Dependency Inversion, and how does it differ from dependency injection?(Hard)
- Are the SOLID principles always worth following?(Hard)
- How do SOLID principles relate to testability?(Medium)
- What is the difference between DRY and premature abstraction?(Hard)
- What is the Dependency Injection container doing, and do you need one?(Medium)
- What is the composition root and why does it matter?(Hard)
- How do you avoid a god class?(Medium)
- What is YAGNI and how does it conflict with good design?(Medium)
- How would you review a class design for quality?(Medium)
- How do you implement a thread-safe singleton, and should you?(Medium)
- What is the Factory Method pattern and when do you use it?(Medium)
- When is the Builder pattern the right choice?(Easy)
- What is the Abstract Factory pattern?(Medium)
- What is the Prototype pattern and where is it useful?(Medium)
- How would you design an object pool and when is one justified?(Hard)
- What is the difference between a static factory method and a constructor?(Medium)
- Why is Singleton often called an anti-pattern?(Medium)
- How do you handle object creation that can fail?(Medium)
- What is dependency injection versus service location?(Medium)
- What is the Adapter pattern and when do you reach for it?(Easy)
- What is the Decorator pattern and how does it differ from inheritance?(Medium)
- What is the Proxy pattern and what are its variants?(Medium)
- What is the Facade pattern?(Easy)
- What is the Composite pattern and where does it apply?(Medium)
- What is the Bridge pattern and how is it different from Adapter?(Hard)
- What is the Flyweight pattern?(Hard)
- How do decorators, proxies and middleware relate?(Medium)
- When is a wrapper class justified versus just using the underlying type?(Medium)
- What is primitive obsession and how do you fix it?(Medium)
- What is the Strategy pattern and when should you use it?(Easy)
- What is the Observer pattern and what are its pitfalls?(Medium)
- What is the State pattern and how does it compare to a state machine?(Medium)
- What is the Command pattern and what does it enable?(Medium)
- What is the Template Method pattern and what is its main weakness?(Medium)
- What is the Chain of Responsibility pattern?(Medium)
- What is the Visitor pattern and why is it controversial?(Hard)
- What is the Mediator pattern?(Medium)
- What is the Memento pattern?(Medium)
- What is the Iterator pattern and why does it matter?(Easy)
- How do you choose between patterns that look similar?(Hard)
- When are design patterns the wrong answer?(Hard)
- How do you design a class to be thread-safe?(Medium)
- What is the difference between thread-safe and reentrant?(Hard)
- How would you design a thread-safe cache?(Hard)
- What is safe publication and why does it matter?(Hard)
- How do you avoid deadlock when a design needs multiple locks?(Hard)
- What is the producer-consumer pattern and how do you size the queue?(Medium)
- How do you design for idempotency in a concurrent system?(Hard)
- When should a design use asynchronous processing instead of synchronous?(Medium)
- How would you design a parking lot system?(Medium)
- How would you design an elevator system?(Medium)
- How would you design a rate limiter?(Hard)
- How would you design an LRU cache?(Medium)
- How would you design a notification system?(Medium)
- How would you design a URL shortener at the class level?(Medium)
- How would you design a library management system?(Medium)
- How would you design a movie ticket booking system?(Hard)
- How would you design a chess game?(Hard)
- How would you design a food delivery system at the class level?(Medium)
- How would you design a logging framework?(Medium)
- How do you approach a machine coding round in the time available?(Medium)
- How do you decide where a piece of behaviour belongs?(Medium)
- What is an aggregate and why does it matter?(Hard)
- How do you model something that changes over time?(Hard)
- How do you avoid a boolean parameter problem?(Easy)
- How do you model optional or missing values?(Medium)
- What does "make illegal states unrepresentable" mean?(Hard)
- How do you decide between an enum and a class hierarchy?(Medium)
- How do you keep domain logic independent of frameworks and databases?(Hard)
- What code smells do you look for first?(Medium)
- How do you refactor safely?(Medium)
- How long should a method be?(Medium)
- What makes a good name?(Easy)
- When should you write a comment?(Easy)
- How do you handle exceptions well in a design?(Medium)
- What is technical debt and how do you decide when to pay it down?(Medium)
- How do you approach adding a feature to code you do not understand?(Medium)
- What makes a good unit test?(Medium)
- When should you use mocks versus real objects in tests?(Hard)
- How do you make time-dependent code testable?(Medium)
- What is the difference between a stub, a mock, a fake and a spy?(Medium)
- How do you decide whether code is over-engineered?(Hard)
- How do you handle a design decision you disagree with in review?(Medium)
- What is the difference between designing for change and speculative generality?(Hard)
- What are interviewers actually assessing in a low-level design round?(Medium)