Home/Interview Prep/Low-Level Design

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.

SOLIDPatternsModellingConcurrencyRefactoringAria-powered explanations
0 / 100 answered
0%
12 Easy62 Medium26 Hard

Showing 120 of 100

#1What is encapsulation and what does it actually buy you?

Easy
OOP Fundamentals

#2When should you use composition instead of inheritance?

Medium
OOP Fundamentals

#3What is the Liskov Substitution Principle and what does violating it look like?

Medium
OOP Fundamentals

#4What is the difference between an abstract class and an interface, and when do you use each?

Easy
OOP Fundamentals

#5What is polymorphism and how does it change how you write code?

Easy
OOP Fundamentals

#6What is the difference between an anemic domain model and a rich one?

Hard
OOP Fundamentals

#7What is the difference between coupling and cohesion?

Medium
OOP Fundamentals

#8Why should you favour immutability, and what does it cost?

Medium
OOP Fundamentals

#9What is the difference between a value object and an entity?

Medium
OOP Fundamentals

#10What does "program to an interface, not an implementation" actually mean in practice?

Medium
OOP Fundamentals

#11What is the Law of Demeter and is it worth following?

Medium
OOP Fundamentals

#12How do you decide what should be a class?

Medium
OOP Fundamentals

#13Explain the Single Responsibility Principle with a concrete example.

Easy
SOLID

#14What is the Open/Closed Principle and how do you achieve it?

Medium
SOLID

#15What is the Interface Segregation Principle?

Medium
SOLID

#16What is Dependency Inversion, and how does it differ from dependency injection?

Hard
SOLID

#17Are the SOLID principles always worth following?

Hard
SOLID

#18How do SOLID principles relate to testability?

Medium
SOLID

#19What is the difference between DRY and premature abstraction?

Hard
SOLID

#20What is the Dependency Injection container doing, and do you need one?

Medium
SOLID

Showing 120 of 100

Ask Aria about Low-Level Design

Sign in to chat with Aria

All 100 Low-Level Design questions at a glance
  1. What is encapsulation and what does it actually buy you?(Easy)
  2. When should you use composition instead of inheritance?(Medium)
  3. What is the Liskov Substitution Principle and what does violating it look like?(Medium)
  4. What is the difference between an abstract class and an interface, and when do you use each?(Easy)
  5. What is polymorphism and how does it change how you write code?(Easy)
  6. What is the difference between an anemic domain model and a rich one?(Hard)
  7. What is the difference between coupling and cohesion?(Medium)
  8. Why should you favour immutability, and what does it cost?(Medium)
  9. What is the difference between a value object and an entity?(Medium)
  10. What does "program to an interface, not an implementation" actually mean in practice?(Medium)
  11. What is the Law of Demeter and is it worth following?(Medium)
  12. How do you decide what should be a class?(Medium)
  13. Explain the Single Responsibility Principle with a concrete example.(Easy)
  14. What is the Open/Closed Principle and how do you achieve it?(Medium)
  15. What is the Interface Segregation Principle?(Medium)
  16. What is Dependency Inversion, and how does it differ from dependency injection?(Hard)
  17. Are the SOLID principles always worth following?(Hard)
  18. How do SOLID principles relate to testability?(Medium)
  19. What is the difference between DRY and premature abstraction?(Hard)
  20. What is the Dependency Injection container doing, and do you need one?(Medium)
  21. What is the composition root and why does it matter?(Hard)
  22. How do you avoid a god class?(Medium)
  23. What is YAGNI and how does it conflict with good design?(Medium)
  24. How would you review a class design for quality?(Medium)
  25. How do you implement a thread-safe singleton, and should you?(Medium)
  26. What is the Factory Method pattern and when do you use it?(Medium)
  27. When is the Builder pattern the right choice?(Easy)
  28. What is the Abstract Factory pattern?(Medium)
  29. What is the Prototype pattern and where is it useful?(Medium)
  30. How would you design an object pool and when is one justified?(Hard)
  31. What is the difference between a static factory method and a constructor?(Medium)
  32. Why is Singleton often called an anti-pattern?(Medium)
  33. How do you handle object creation that can fail?(Medium)
  34. What is dependency injection versus service location?(Medium)
  35. What is the Adapter pattern and when do you reach for it?(Easy)
  36. What is the Decorator pattern and how does it differ from inheritance?(Medium)
  37. What is the Proxy pattern and what are its variants?(Medium)
  38. What is the Facade pattern?(Easy)
  39. What is the Composite pattern and where does it apply?(Medium)
  40. What is the Bridge pattern and how is it different from Adapter?(Hard)
  41. What is the Flyweight pattern?(Hard)
  42. How do decorators, proxies and middleware relate?(Medium)
  43. When is a wrapper class justified versus just using the underlying type?(Medium)
  44. What is primitive obsession and how do you fix it?(Medium)
  45. What is the Strategy pattern and when should you use it?(Easy)
  46. What is the Observer pattern and what are its pitfalls?(Medium)
  47. What is the State pattern and how does it compare to a state machine?(Medium)
  48. What is the Command pattern and what does it enable?(Medium)
  49. What is the Template Method pattern and what is its main weakness?(Medium)
  50. What is the Chain of Responsibility pattern?(Medium)
  51. What is the Visitor pattern and why is it controversial?(Hard)
  52. What is the Mediator pattern?(Medium)
  53. What is the Memento pattern?(Medium)
  54. What is the Iterator pattern and why does it matter?(Easy)
  55. How do you choose between patterns that look similar?(Hard)
  56. When are design patterns the wrong answer?(Hard)
  57. How do you design a class to be thread-safe?(Medium)
  58. What is the difference between thread-safe and reentrant?(Hard)
  59. How would you design a thread-safe cache?(Hard)
  60. What is safe publication and why does it matter?(Hard)
  61. How do you avoid deadlock when a design needs multiple locks?(Hard)
  62. What is the producer-consumer pattern and how do you size the queue?(Medium)
  63. How do you design for idempotency in a concurrent system?(Hard)
  64. When should a design use asynchronous processing instead of synchronous?(Medium)
  65. How would you design a parking lot system?(Medium)
  66. How would you design an elevator system?(Medium)
  67. How would you design a rate limiter?(Hard)
  68. How would you design an LRU cache?(Medium)
  69. How would you design a notification system?(Medium)
  70. How would you design a URL shortener at the class level?(Medium)
  71. How would you design a library management system?(Medium)
  72. How would you design a movie ticket booking system?(Hard)
  73. How would you design a chess game?(Hard)
  74. How would you design a food delivery system at the class level?(Medium)
  75. How would you design a logging framework?(Medium)
  76. How do you approach a machine coding round in the time available?(Medium)
  77. How do you decide where a piece of behaviour belongs?(Medium)
  78. What is an aggregate and why does it matter?(Hard)
  79. How do you model something that changes over time?(Hard)
  80. How do you avoid a boolean parameter problem?(Easy)
  81. How do you model optional or missing values?(Medium)
  82. What does "make illegal states unrepresentable" mean?(Hard)
  83. How do you decide between an enum and a class hierarchy?(Medium)
  84. How do you keep domain logic independent of frameworks and databases?(Hard)
  85. What code smells do you look for first?(Medium)
  86. How do you refactor safely?(Medium)
  87. How long should a method be?(Medium)
  88. What makes a good name?(Easy)
  89. When should you write a comment?(Easy)
  90. How do you handle exceptions well in a design?(Medium)
  91. What is technical debt and how do you decide when to pay it down?(Medium)
  92. How do you approach adding a feature to code you do not understand?(Medium)
  93. What makes a good unit test?(Medium)
  94. When should you use mocks versus real objects in tests?(Hard)
  95. How do you make time-dependent code testable?(Medium)
  96. What is the difference between a stub, a mock, a fake and a spy?(Medium)
  97. How do you decide whether code is over-engineered?(Hard)
  98. How do you handle a design decision you disagree with in review?(Medium)
  99. What is the difference between designing for change and speculative generality?(Hard)
  100. What are interviewers actually assessing in a low-level design round?(Medium)