Low-Level Design (LLD) Interview Notes, Animated
Low-level design notes for interviews: UML class diagrams, design patterns applied, and parking lot, elevator, LRU cache and BookMyShow, animated with code.
- Notes: 9
- Reading time: about 62 minutes
- Cost: Free, no sign-in needed
UML class diagrams, SOLID and design patterns applied, and the classic machine-coding rounds — parking lot, elevator, LRU cache, BookMyShow, Splitwise — animated, with code.
Read in this order
- Introduction to Low-Level Design — What a low-level design or machine-coding round asks, how LLD differs from HLD, a seven-step approach from requirements to code, and what gets graded.
- UML Class Diagrams for LLD Interviews — UML class diagrams for low-level design interviews: class box notation, visibility, the six relationships, multiplicity and a library example built up.
- Design Patterns in LLD — The six design patterns LLD rounds use most, each tied to a real use: Strategy pricing, Observer displays, State machines, Factory, Singleton, Decorator.
- Design an LRU Cache — Design an LRU cache with O(1) get and put: hash map plus doubly linked list, the class diagram, eviction animated, thread safety, TTL and full code.
- Design a Parking Lot — Parking lot LLD for machine-coding interviews: requirements, a class diagram, Strategy for spot allocation and pricing, Factory, and runnable code.
- Design a Vending Machine — Vending machine low-level design: the State pattern over Idle, HasMoney, Dispensing and OutOfStock, greedy change-making, a class diagram and runnable code.
- Design an Elevator System — Elevator system low-level design: a dispatcher for several cars, direction as state, SCAN and LOOK scheduling as a Strategy, animated, with runnable code.
- Design a Movie Ticket Booking System (BookMyShow) — Low-level design of a movie ticket booking system like BookMyShow: classes, seat holds with a timeout, the double-booking race and patterns, with code.
- Design an Expense Sharing App (Splitwise) — Low-level design of an expense sharing app like Splitwise: classes, equal, exact and percent splits as a Strategy, net balances and simplifying debts.