Low-Level Design Interview Questions: 10 Classic Problems Explained
By Preeti Verma
Low-level design (LLD) interviews ask you to design the classes for one system: their responsibilities, their relationships and how they behave, not the servers and databases around them. Interviewers usually care about three things: did you clarify requirements before designing, is each class's responsibility clean, and did you reach for a pattern only where it actually helps.
For the difference between LLD and high-level design, and a general framework, see our system design guide for beginners. This post goes through 10 specific LLD problems.
1. Design a parking lot
What it tests: modelling entities and their relationships, and handling variation (spot sizes, vehicle types) cleanly. Core classes: ParkingLot, Level, ParkingSpot (with a size and a type), Vehicle (with a size). The interesting part is the assignment algorithm: given a vehicle, find the smallest spot that fits it. A follow-up almost always adds pricing that varies by time of day or day of week, which is a natural fit for the Strategy pattern, one class per pricing rule, so a new rule needs no change to existing code.
2. Design an LRU cache
What it tests: picking the right data structures for O(1) operations. The classic answer combines a hash map (key to node) with a doubly linked list (order of use). get() moves the accessed node to the front and returns it in O(1). put() adds to the front and evicts from the back when over capacity, also O(1). Many languages have a built-in ordered map that does this for you, but interviewers usually want you to build it from primitives.
3. Design a vending machine
What it tests: modelling state and transitions cleanly. This is a natural fit for the State pattern: states like Idle, HasMoney, Dispensing, OutOfStock, each knowing what actions are valid and what the next state is. The alternative, a single class with a big switch on a status field, gets messy fast as more transitions are added, which is exactly the trade-off worth naming out loud.
4. Design an elevator system
What it tests: handling concurrent requests and a non-trivial scheduling algorithm. Core classes: Elevator (current floor, direction, state), ElevatorController (assigns requests to elevators), Request (floor, direction). The interesting design decision is the scheduling strategy, for example prefer an elevator already moving in the right direction, and whether to make that pluggable (Strategy again) so you can swap in a smarter algorithm later.
5. Design a library management system
What it tests: basic entity modelling and handling business rules (fines, holds, limits). Core classes: Book, BookItem (a physical copy, since one Book can have several), Member, Loan. A good design separates the catalog (Book) from inventory (BookItem), since a member borrows a specific copy, not the abstract book.
6. Design a rate limiter
What it tests: choosing the right algorithm and where the state lives. Common algorithms: fixed window (simple but allows bursts at window edges), sliding window (smoother, more bookkeeping), token bucket (allows bursts up to a cap, refills over time). A strong answer picks one, explains the trade-off against the others, and addresses where counts are stored when there is more than one server (this is where an LLD question starts touching HLD).
7. Design a chess or tic-tac-toe game
What it tests: modelling a board, pieces and rules cleanly, and validating moves. Core classes: Board, Piece (or a Piece hierarchy for chess, one subclass per piece type with its own valid-move logic), Player, Move. Chess in particular tests whether you can use inheritance or an interface well: each piece type needs its own movement rules, so a canMove() method per piece type is a natural fit, rather than one giant if-else on piece type in the Board class.
8. Design a notification system
What it tests: a good extension point for adding new channels. Core classes: a Notification (content, recipient), and a NotificationChannel interface implemented by EmailChannel, SmsChannel, PushChannel. This is the Strategy pattern again: adding WhatsApp later means adding a class, not modifying a switch statement. A follow-up often asks how you would retry a failed send, which brings in a queue.
9. Design a URL shortener's core class (not the whole system)
What it tests: the same problem as an HLD question, but scoped to code, not infrastructure. The interesting part is the encoding scheme: base-62 encoding a counter is simple but leaks how many URLs exist and needs coordination across servers; a random string with a uniqueness check is simpler to distribute but needs a collision check. Explain the trade-off rather than picking one silently.
10. Design a logging framework
What it tests: extensibility (multiple output destinations, log levels) without over-engineering. Core classes: Logger, LogLevel, and a LogAppender interface (console, file, remote) that Logger writes to. This is again Strategy for the destinations, plus a simple check of level against a configured threshold before doing any work, which matters for performance.
The pattern behind the patterns
Most LLD questions are really testing whether you reach for Strategy (interchangeable behavior, like pricing or notification channels), State (an object whose valid actions depend on its current state), or Factory (centralizing how objects are created, especially when the exact type depends on input) at the right moment, and whether you can justify not using a pattern when a plain class is simpler. Naming the pattern is worth less than explaining why it fits this specific problem.
How to practise
Pick one problem, give yourself 30 minutes, sketch the classes on paper or a whiteboard app, then walk through one or two scenarios (a request comes in, what happens step by step) to test whether your design actually holds up. Our Resources section has 50 low-level design questions with a short description of what each one covers, and the AI Coach can explain the reasoning behind any of them.