Low Level Design (LLD) Interview Questions
18 questions
Machines & State Systems
- Design a Parking Lot
Easy
Parking lot low level design. The class model for vehicles, bays and tickets, spot allocation and pricing behind strategies, and the race for the last space, with a full implementation in Java and Kotlin.
- Design a Lift System
Medium
Lift low level design. Requests that carry a direction, the SCAN sweep in one step method, dispatch behind a strategy, and how simultaneous hall calls are handled, in Java and Kotlin.
- Design an ATM
Medium
ATM low level design. The state machine for the session, note dispensing as a chain, and the withdrawal that debits, dispenses and credits back when the shutter jams, in Java and Kotlin.
- Design a Vending Machine
Easy
Vending machine low level design. The state machine as the whole answer, coins that stay the customer's until the product is out, greedy change from the float, and a jammed motor, in Java and Kotlin.
Games
- Design Snake and Ladder
Easy
Snake and ladder low level design, one BoardEntity for both snakes and ladders, chained jumps, the exact finish rule, a queue for turn order, and a working implementation in Java and Kotlin.
- Design Tic Tac Toe
Easy
Tic tac toe low level design, an N by N board with N players, the board separated from the win rule, O(1) win detection and O(1) undo with counters, and a working implementation in Java and Kotlin.
- Design Ludo
Medium
Ludo low level design, the rule set stated up front, a token position stored as steps travelled, a MoveValidator producing every legal move and a MoveSelectionStrategy choosing one, in Java and Kotlin.
- Design a Chess Game
Medium
Chess low level design, movement rules on the piece itself, one ray walker shared by the sliding pieces, legality as apply and test and revert, and check, checkmate and stalemate read off one move generator, in Java and Kotlin.
Booking & Marketplace
- Design a Movie Ticket Booking System
Medium
BookMyShow low level design. Seat locking with a TTL, an owner checked release, what happens when the lock expires while a card is being charged, and a working implementation in Java and Kotlin.
- Design a Food Ordering and Delivery Service
Hard
Food ordering low level design. An explicit order status transition map with guarded transitions, delivery assignment as a strategy, a fan out to customer, restaurant and courier, and a working implementation in Java and Kotlin.
- Design Booking.com
Hard
Booking.com low level design. A marketplace of properties with room type inventory counted per night, holds with a TTL, an owner checked release, idempotent confirmation, and a working implementation in Java and Kotlin.
- Design Uber
Hard
Uber low level design. Ranking strategies for matching, surge as a decorator over pricing, a trip state model, and the atomic check and set that stops two riders being given the same driver, in Java and Kotlin.
- Design Splitwise
Medium
Splitwise low level design. Split rules as a strategy, a pairwise balance sheet that nets as it records, and greedy debt simplification with the honest caveat about why it is not the true minimum, in Java and Kotlin.
Android Components From Scratch
Android interviewers increasingly ask you to rebuild a Jetpack component from scratch. The point is not the API surface, it is whether you understand why the real one is shaped the way it is.
- Implement your own LiveData
Medium
LiveData from scratch, a lifecycle aware value holder where a version counter decides who gets a delivery, with setValue, postValue, MediatorLiveData and the single event pitfall, in Java and Kotlin.
- Implement your own ViewModel
Medium
Build a ViewModel, a ViewModelStore and a ViewModelProvider from scratch, see why the store survives rotation but not process death, and watch shared fragment models and viewModelScope fall out of the same design, in Java and Kotlin.
- Implement an Event Bus
Easy
Event bus low level design, a type keyed registry of copy on write subscriber lists, lifecycle bound subscriptions that cannot leak a screen, delivery on an executor the subscriber picked, and sticky events, in Java and Kotlin.
- Implement a Dependency Injection Container
Medium
Build your own Dagger or Koin. A map from a type to a provider lambda, singleton and factory lifetimes, child scopes that see their parent, cycle detection, startup validation, in Java and Kotlin.
Utility & Platform Services
- Design a Rate Limiter
Medium
Rate limiter low level design. One tryAcquire method with fixed window, sliding window and token bucket behind it, lazy refill off an injected clock, per key buckets that evict themselves, in Java and Kotlin.