Low Level Design — Machine Coding & OOD
A structured path through the object-oriented design interview — from OOP and SOLID foundations to machine-coding classics and expert systems. Every problem is a full walkthrough: requirements, an interactive UML class diagram, patterns, complete Java, a dry run, complexity, and follow-up questions.
56
Problems & concepts
56
Available now
5
Learning tiers
24+
Design patterns
Your progress
Recommended next
OOP Fundamentals
Encapsulation, abstraction, inheritance, and polymorphism — the four pillars every LLD answer is built on.
Design a Parking Lot
The canonical LLD warm-up — multi-level lots, vehicle/spot types, ticketing, and pluggable pricing.
Recommended
OOP Fundamentals
Encapsulation, abstraction, inheritance, and polymorphism — the four pillars every LLD answer is built on.
Design a Parking Lot
The canonical LLD warm-up — multi-level lots, vehicle/spot types, ticketing, and pluggable pricing.
SOLID Principles
The five principles (SRP, OCP, LSP, ISP, DIP) that separate a maintainable design from a brittle one.
Concepts & Foundations
The vocabulary of object-oriented design — OOP, SOLID, design principles, UML, the pattern families, and concurrency. Master these before touching a problem.
OOP Fundamentals
Encapsulation, abstraction, inheritance, and polymorphism — the four pillars every LLD answer is built on.
SOLID Principles
The five principles (SRP, OCP, LSP, ISP, DIP) that separate a maintainable design from a brittle one.
Design Principles (DRY, KISS, YAGNI)
The pragmatic heuristics — DRY, KISS, YAGNI, composition over inheritance, and law of Demeter — that keep code lean.
UML for Interviews
Read and draw class, sequence, and state diagrams fast — the notation interviewers expect on the whiteboard.
Creational Patterns
Singleton, Factory, Abstract Factory, Builder, and Prototype — how to control object creation cleanly.
Structural Patterns
Adapter, Decorator, Facade, Composite, Proxy, Bridge, and Flyweight — how to compose objects into larger structures.
Behavioral Patterns
Strategy, Observer, State, Command, Chain of Responsibility, and more — how objects collaborate and share responsibility.
Concurrency & Multithreading
Threads, locks, atomics, thread-safe collections, and producer-consumer — making an LLD design safe under load.
Java Collections for LLD
Pick the right List, Map, Set, Queue, or concurrent collection — and know the tradeoffs cold.
LLD Best Practices
A pragmatic checklist for machine-coding rounds — naming, immutability, error handling, testing, and time management.
Beginner
Your first machine-coding rounds — small, self-contained systems (parking lot, ATM, vending machine, tic-tac-toe) that teach the design loop end to end.
Design a Parking Lot
The canonical LLD warm-up — multi-level lots, vehicle/spot types, ticketing, and pluggable pricing.
Design a Vending Machine
A finite-state machine done right — idle, selecting, dispensing, and refunding, with inventory and change.
Design a Coffee Machine
Recipes, shared ingredients, and concurrent dispensing — a compact study in Builder + resource contention.
Design an ATM
A textbook State-pattern problem — card, PIN, selection, and dispense states with a cash-management backend.
Design Tic-Tac-Toe
A clean two-player game engine — board, moves, win detection, and an extensible rules/strategy seam.
Design Snake & Ladder
Board, dice, snakes, ladders, and turn management — small surface, plenty of clean-modelling opportunities.
Design a Library Management System
Members, books, copies, holds, and fines — the classic CRUD-heavy modelling exercise done cleanly.
Intermediate
Richer domains with more entities, state, and edge cases — elevators, caches, carts, and multiplayer games where patterns start to earn their keep.
Design an Elevator System
Multi-car scheduling, direction/state machines, and pluggable dispatch strategies under concurrent requests.
Design an LRU Cache
O(1) get/put with a hashmap + doubly-linked list — the most-asked data-structure design in machine coding.
Design Splitwise
Groups, expenses, and split strategies (equal/exact/percent) with a balance-simplification engine.
Design a Logging Framework
Levels, appenders, and a handler chain — a Chain-of-Responsibility showcase with async, thread-safe sinks.
Design a Rate Limiter (LLD)
Token bucket, leaky bucket, and sliding window as interchangeable strategies behind one thread-safe interface.
Design a URL Shortener (LLD)
The object model behind TinyURL — encoders, repositories, and expiry, without the distributed-systems layer.
Design a Movie Ticket Booking System
BookMyShow — theatres, shows, seat maps, and concurrent seat locking with a payment workflow.
Design a Hotel Management System
Rooms, rates, reservations, check-in/out, and housekeeping — a broad domain-modelling exercise.
Design a Shopping Cart
Cart items, pluggable discount/pricing rules, and a checkout pipeline with tax and coupons.
Design a Digital Wallet
Accounts, balances, transfers, and a double-entry ledger with idempotent, atomic transactions.
Design an Inventory Management System
SKUs, warehouses, stock movements, and reorder rules with an event-driven low-stock notifier.
Design Minesweeper
Grid generation, flood-fill reveal, flagging, and win/lose detection — a tidy board-game engine.
Design Ludo
Multiple players, tokens, dice, home paths, and turn/capture rules — multiplayer state modelled cleanly.
Design a Notification System
Multi-channel (email/SMS/push) delivery with templates, preferences, retries, and pluggable providers.
Advanced
Systems with real concurrency, pluggable strategies, and non-trivial invariants — schedulers, message queues, file systems, and booking platforms.
Design Chess
Pieces, moves, check/checkmate, and rules — a polymorphism-heavy engine with per-piece move strategies.
Design an LFU Cache
Least-Frequently-Used eviction in O(1) with frequency buckets — the harder cousin of LRU.
Design a Task Scheduler
Cron-like scheduling, priority queues, worker pools, and retry/backoff under concurrency.
Design an In-Memory Message Queue
Topics, producers, consumers, offsets, and delivery guarantees — Kafka's object model in miniature.
Design an In-Memory File System
Directories, files, paths, and a Composite tree with ls/mkdir/read/write operations.
Design the Linux 'find' Command
Composable filters (name/size/type) combined with And/Or/Not — a Specification + Composite exercise.
Design a Text Editor
Insert/delete, cursor movement, and undo/redo via Command + Memento, with a gap-buffer document model.
Design an Airline Reservation System
Flights, fares, seat inventory, PNRs, and a booking/cancellation workflow with concurrency control.
Design a Food Delivery System
Restaurants, menus, carts, orders, and delivery-partner matching — Swiggy/DoorDash object modelling.
Design a Cab Booking System
Riders, drivers, trip lifecycle, surge pricing, and nearest-driver matching — Uber/Ola in objects.
Design a Feature Flag Service
Flags, targeting rules, rollout percentages, and evaluation — a rules-engine + strategy design.
Design an Authentication Service
Signup/login, password hashing, sessions/tokens, and pluggable providers (password, OTP, OAuth).
Design a Role-Based Access Control (RBAC) System
Users, roles, permissions, and resource-level checks with hierarchical roles and policy evaluation.
Expert
Staff-level object modelling for products at scale — payments, collaboration suites, chat platforms, drives, and AI systems, where extensibility is the whole point.
Design a Payment Gateway
Payment intents, provider adapters, idempotency, webhooks, and a saga for capture/refund flows.
Design a Banking System
Accounts, transactions, a double-entry ledger, interest, and statements with strong consistency.
Design WhatsApp (LLD)
Users, chats, messages, delivery/read receipts, and group management — the messaging object model.
Design Slack (LLD)
Workspaces, channels, threads, mentions, and notifications — team-chat modelled with clean boundaries.
Design Google Docs (LLD)
Documents, collaborative editing, operational transforms/CRDTs, and version history modelled in objects.
Design Trello (LLD)
Boards, lists, cards, labels, and drag-drop ordering with activity feeds — Kanban in objects.
Design Jira (LLD)
Issues, workflows/state machines, sprints, and a flexible custom-field model with audit history.
Design Dropbox (LLD)
Files, folders, versioning, chunking, and sync-state modelling for a file-hosting client.
Design Google Drive (LLD)
Files, folders, sharing/permissions, and search — a hierarchical storage model with ACLs.
Design an API Gateway (LLD)
Routing, middleware chains (auth/rate-limit/logging), and pluggable filters behind one entry point.
Design an AI Chat Platform (LLD)
Conversations, messages, model providers, streaming, tools, and context windows modelled in objects.
Design a RAG Pipeline (LLD)
Loaders, chunkers, embedders, a vector store, retrievers, and a generation step composed as a pipeline.