Low-Level Design interview prep
- 2D Vector Class — Design an immutable 2D vector with natural operator syntax, dot and cross products, rotation, and equality and
- Abstract Factory Pattern — One factory object creates a whole family of parts that are made to go together, so a client never mixes a lig
- Abstraction — Abstraction shows callers what a component does and hides how. Choosing what to show is the central design dec
- Access Control Tree — Design a tree of resources, like folders and files, where a permission granted on a folder applies to everythi
- Access Management System — Design a role-based access control system: users hold roles, roles hold permissions and inherit from other rol
- Account Balance Tracker — Design accounts with deposits, withdrawals and transfers that stay correct when many threads run them at once,
- Active Users in the Last N Minutes — Design a counter that answers how many distinct users were active in the last N minutes, with an exact version
- Activity Diagram — The UML picture of a process: the steps, the decisions, and the work that runs in parallel. It is a flowchart
- Actor System — Design a small actor system: actors that own their state and talk only by messages, a mailbox per actor, a sha
- Adapter Pattern — Wrap a class whose interface does not fit so that the code you already have can call it without changing eithe
- Aggregation — A whole that groups parts it does not own: the parts are created elsewhere, can be shared, and outlive the who
- Airline Management System — Design the booking side of an airline: search flights, hold a seat while the passenger pays, confirm, cancel u
- Amazon Locker — Design a self-service parcel locker site: put each package in the smallest locker it fits, give the customer a
- Amazon Shopping System — Design the core of an online store: a searchable catalog, a cart, stock that is never oversold, promotions and
- Association — The general link between two classes: each object keeps its own lifecycle, and the link carries a direction an
- ATM System — Design a cash machine: card and PIN, a state machine for the session, a chain of note handlers that plans befo
- Barriers & Latches — Making a group of threads meet at a point: the one-shot CountDownLatch, the reusable CyclicBarrier, the flexib
- Blackjack Card Game — Design a Blackjack table: a shoe of shuffled decks, hands that count an ace as 1 or 11, bets, hit, stand, doub
- Bloom Filter — A bit array and k hash functions that answer is this item in the set with a certain no or a probable yes, in a
- Bloom Filter — Design a Bloom filter as a reusable class: sized from an item count and a false positive rate, with pluggable
- Bridge Pattern — Split one class family that varies in two directions into two hierarchies joined by composition, so each side
- Builder Pattern — Build a complex object step by step through a builder, so many optional parts do not turn into a constructor n
- Car Rental System — Design a car rental system that books cars by category and date range across branches, supports one-way rental
- Chain of Responsibility — Link handlers in a row and pass each request down the row until one takes it, so the sender never has to know
- Chat Application — Design the core of a chat server: direct and group conversations, server-assigned order, an offline queue flus
- Chess Game — Design a two-player chess game: the board, the six piece types and their moves, legal-move checking, and check
- Circuit Breaker Pattern — A three-state switch in front of a failing dependency: build it, trace it, count failures over a window, and k
- Class Diagram — The UML picture of a design at rest: the classes, what they hold and do, and how they relate. In an LLD interv
- Classes & Objects — A class describes a kind of thing: its data and the operations on that data. An object is one such thing, aliv
- Classic Concurrency Problems — Producer-consumer, readers-writers and dining philosophers: each problem run as real threads, the failure repr
- Clean Architecture — The four rings of Clean Architecture, the Dependency Rule, how a call crosses a boundary when control flows ou
- Coffee Vending Machine — Design a machine that sells drinks made from a stock of ingredients: pick a drink, pay, get the drink and the
- Command Pattern — Turn an action into an object, so it can be stored, queued, logged, undone and run by code that does not know
- Composite Pattern — Build tree structures where a single item and a group of items share one interface, so callers run the same op
- Composition — A whole that owns its parts: it creates them, nothing else holds them, and they end when it ends. Also the des
- Concurrency Coding Problems — The classic multithreaded interview problems (print in order, alternating output, FizzBuzz with four threads,
- Concurrency Fundamentals — Concurrency versus parallelism, processes versus threads versus async, and the bugs shared state causes: a los
- Concurrency Patterns — The three bugs of shared state (races, deadlocks, stale reads) and the patterns that prevent them: locks, thre
- Concurrent Data Structures — How thread-safe collections avoid one big lock (striped locks, compare-and-swap, copy-on-write, striped counte
- Condition Variables — How a thread sleeps until shared state changes: the wait protocol, why the wait sits in a while loop, lost and
- Connection Pooling — Build a connection pool as code: a bounded set of reusable connections, a wait with a timeout, validation, lif
- Consistent Hashing — Build the hash ring as code: a sorted list of points, a binary search, virtual nodes for balance, and replicat
- CQRS Pattern — One model for changing data, another for reading it. Know where the idea comes from, the three levels you can
- CricInfo — Design the scoring core of a live cricket site: a scorer enters each ball, the system applies the Laws (extras
- DAO and DTO Patterns — A Data Access Object hides how data is stored; a Data Transfer Object carries data across a boundary and nothi
- Decorator Pattern — Add behavior to one object by wrapping it in another object with the same interface, so features stack at run
- Dependency Injection — A class receives what it needs instead of building it. Know the three forms Fowler named, why constructor inje
- Dependency Inversion Principle — High-level policy should not depend on low-level detail. Both depend on an abstraction, and the abstraction is
- Design Circular Queue — Design a fixed-capacity first-in, first-out queue on one array: two indexes that wrap around, a size counter t
- Design GPU Credits — Design the credits system behind a cloud GPU service: users buy credits, launch instances that burn credits by
- Design HashMap — Build a key-value store with put, get and remove in O(1) average time: a bucket array, a hash function, chaini
- Disk Space Manager — Design the part of a file system that hands out fixed-size disk blocks, takes them back, reports fragmentation
- Domain-Driven Design — Model the code on the business, in the business's own words. Know the building blocks (entities, value objects
- Don't Repeat Yourself (DRY) — Every piece of knowledge in a system has one authoritative home. DRY is about facts and rules, not about lines
- Elevator System — Design a controller for several elevator cars: each car serves its stops in sweeps (the LOOK rule), and a disp
- Encapsulation — Encapsulation keeps an object's state and the code that guards it in one place, and lets nothing else change t
- Event Sourcing — Store what happened, not what is. Know how state is rebuilt from an append-only log, what snapshots and versio
- Facade Pattern — Put one small, plain interface in front of a subsystem of many classes so that most callers never need to lear
- Factory Method Pattern — A subclass decides which concrete object to create, so the code that uses the object never names its class.
- Flyweight Pattern — Share the data that many small objects have in common, so a million objects cost little more than a handful.
- Fork/Join Framework — Divide-and-conquer parallelism: split a task until it is small, run the halves on a work-stealing pool, and jo
- Front Controller Pattern — One handler receives every web request, runs the shared work once, and dispatches to the right command. Know h
- Go Fish — Design the card game Go Fish: a deck, hands grouped by rank, an ask that either takes cards or fishes, books o
- Hexagonal Architecture — Ports and Adapters: the application in the middle, every outside thing behind a port. Know the two kinds of po
- Hotel Management System — Design a hotel system that books room types for date ranges without overbooking any night, assigns a clean roo
- In-Memory File System — Design a file system that lives in memory: a tree of directories and files with mkdir, ls, write, read, rm and
- Inheritance — A subclass takes the fields and methods of its parent and adds or replaces some. It is the right tool for a tr
- Interface Segregation Principle — No client should be forced to depend on methods it does not use. Split a fat interface into small ones, each s
- Interfaces — An interface is a contract: the operations a type promises, with no say in how they are done. Code that depend
- Interpreter Pattern — Represent each rule of a small grammar as a class, build sentences as a tree of those objects, and evaluate th
- Inventory Management — Design a system that tracks stock per product and warehouse, promises units to orders without overselling, pic
- Iterator Pattern — Walk through the items of a collection one at a time without knowing, or depending on, how the collection stor
- Keep It Simple Stupid (KISS) — Build the simplest design that meets the real requirements, and add a moving part only when a measured problem
- Law of Demeter — A method talks only to its own object, its parameters, the objects it creates and its own fields. It never rea
- Layered (N-Tier) Architecture — Presentation, application, domain and data access stacked so each layer only calls the one below. Know layers
- Learning Platform — Design an online course platform: courses built from modules and lessons, enrollment with prerequisites, per-l
- Library Management System — Design a library: a catalog of books with physical copies, members with lending rules, loans with due dates an
- LinkedIn — Design the core of a professional network: profiles, connection requests, degrees of separation, visibility by
- Liskov Substitution Principle — Code written against a base type must keep working when it is handed any subtype. A subtype may promise more,
- Locker Allocation System — Design the software behind a bank of parcel lockers: place each package in the smallest free locker that fits,
- Logging Framework — Design the logging library an application calls: named loggers with levels, handlers that write to different p
- LRU Cache — Design a fixed-size key-value store that drops the entry nobody has touched for the longest time. Both operati
- LRU Cache Design — A fixed-size cache that evicts the least recently used entry, with O(1) get and put from a hash map and a doub
- LSM Tree Design — The write-optimized storage engine behind LevelDB, RocksDB and Cassandra, built as code: log, memtable, sorted
- Mediator Pattern — Route all communication between a group of objects through one coordinator, so the objects know the coordinato
- Meeting Scheduler — Design a meeting scheduler that finds common free time across people in different time zones, books them and a
- Memento Pattern — Save an object's state in a sealed snapshot that only the object itself can read back, so undo and rollback do
- Memory Allocator — Design malloc and free over one contiguous range of addresses: find room, split what is too big, and merge fre
- Movie Ticket Booking — Design a movie ticket booking system that holds seats for a few minutes while the user pays, never sells a sea
- MVC / MVP / MVVM — Three ways to keep the user interface apart from the domain logic. Know who talks to whom in each, why the dif
- Notepad System — Design a small text editor: notes with insert and delete, unlimited undo and redo, tags and search. The undo s
- Notification System — Design a service that sends each notification on the channels a user chose, with templates, quiet hours, prior
- Null Object Pattern — An object that implements the interface and does nothing, so callers stop checking for null. Know when absence
- Observer Pattern — Let any number of objects react when one object changes, without that object knowing who they are.
- Online Food Delivery — Design the object model of a food delivery platform: a customer orders from a restaurant, the restaurant accep
- Online Stock Brokerage — Design a brokerage with an order book per stock: market, limit and stop orders matched by price-time priority,
- OOP Anti-Patterns — The design mistakes interviewers plant in code review questions, how to name each one, and the refactoring tha
- Open/Closed Principle — Add new behavior by adding new code, not by editing code that already works. Abstractions make that possible;
- Parking Lot — Design a multi-floor parking lot that assigns each vehicle a spot it fits, issues a ticket, and charges for th
- Payment Gateway — Design the core of a payment gateway: authorize, capture, void and refund through a processor per payment meth
- Polymorphism — One call, many behaviors: code written against a common type runs the right method for each object at run time
- Prototype Pattern — Make new objects by copying a configured one instead of building from scratch, and know exactly what a copy sh
- Proxy Pattern — Stand an object with the same interface in front of the real one so you can delay, deny, cache or log access w
- Pub Sub System — Design an in-process publish-subscribe broker: topics, named subscriptions that each get every message, worker
- Queue Using an Array — Build a first-in, first-out queue on top of a fixed-size array so that enqueue, dequeue and peek all run in co
- Rate Limiter — Design the classes of a rate limiter: interchangeable algorithms behind one interface, per-tier and global rul
- Rate Limiter Design — Token bucket, leaky bucket, fixed window, sliding log and sliding counter as code you can trace, plus how to m
- Read-Write Locks — Shared access for readers, exclusive access for writers: the three fairness policies and who starves, a tested
- Repository Pattern — A collection-like interface between the domain and the data store. Know where the interface lives, why that di
- Restaurant Management — Design the system behind a sit-down restaurant: seat a party, take an order, send each item to the right kitch
- Ride Hailing Service — Design the object model of a ride hailing service: riders request trips, a grid index finds the nearest free d
- Rock Paper Scissors — Design rock paper scissors as a small object model: rules as data, players that choose moves, and a best-of-N
- Saga Pattern (Distributed Transactions) — Keep data consistent across several services without a distributed transaction: a chain of local transactions,
- Search Autocomplete — Design the object behind a search box that shows the most searched queries starting with what the user has typ
- Sequence Diagram — The UML picture of one scenario over time: which objects send which messages, in what order, and what comes ba
- Service Layer Pattern — The layer of operations that sits at the edge of an application: one method per use case that checks access, l
- Shopping Cart — Design a shopping cart that holds items, prices them with stackable promotions and coupons, and turns them int
- Single Responsibility Principle — A class should have one reason to change, and a reason to change is a group of people who ask for changes.
- Singleton Pattern — One instance of a class, reached from one place. Know how to build it safely, why interviewers treat it as a s
- Snake and Ladder — Design the board game: a numbered board with snakes and ladders, a die, players who take turns, and a win rule
- Social Network — Design the core of a social network: follows and friendships, posts with visibility rules, a news feed that mi
- SOLID Principles Summary — The five SOLID principles in one place: what each one asks for, how they depend on each other, and one small e
- Splitwise — Design an expense-sharing service: one person pays, the bill is split by a rule, balances are tracked in whole
- Spotify — Design a music player and its playlists: collaborative playlists that stay consistent under concurrent edits,
- Stack Overflow — Design a question-and-answer site with votes, accepted answers, tags and a reputation score that follows the r
- State Machine Diagram — The UML picture of one object over its lifetime: the states it can be in, the events that move it, and the gua
- State Pattern — Give each mode of an object its own class, so the object changes behavior by swapping the state object instead
- Strategy Pattern — Put each way of doing a job in its own object behind one interface, so the caller can swap the way without cha
- Synchronization Primitives — Mutexes, reentrant locks, semaphores, condition variables, read-write locks, barriers and events: what each on
- Task Scheduler — Design an in-process scheduler that runs one-time and recurring tasks at the right moment on a pool of worker
- Template Method Pattern — Fix the order of an algorithm's steps in a base class and let subclasses fill in the steps that differ.
- Thread Lifecycle — The six Java thread states and what moves a thread between them, BLOCKED versus WAITING in a thread dump, daem
- Thread Pools — Why pools exist, how Java's ThreadPoolExecutor decides between a new thread, the queue and rejection, how to s
- Thread-Safe Queue Design — A bounded blocking queue built from a lock and two condition variables, traced and tested with real threads; t
- Tic Tac Toe — Design a two-player Tic Tac Toe with move validation, constant-time win detection, a draw rule and a scoreboar
- Traffic Control System — Design the controller for one signalized intersection: cycle the lights through safe phases, size each green f
- Trie (Prefix Tree) — A tree keyed by characters, where the path from the root spells a prefix: lookup, insert and prefix search in
- URL Shortener — Design the classes of a URL shortener: generate unique short codes, accept custom aliases safely, resolve code
- Use Case Diagram — The UML picture of who uses a system and what they use it for. It is the fastest way to agree on scope before
- Vending Machine — Design a machine that takes coins, sells a product, returns change and lets the customer cancel. The interview
- Version Control System — Design a small Git-like version control system: content-addressed file storage, commits that form a graph, bra
- Visitor Pattern — Put each operation over a fixed family of classes into its own visitor object, so new operations do not touch
- You Aren't Gonna Need It (YAGNI) — Build a capability when a real requirement needs it, not when you foresee that one might. Keep the code easy t
Start free on Cariara · Coding problems · System design studio