Low-level design
Object-oriented design for interviews: the framework, design principles and patterns, concurrency, and problem breakdowns you can practice in the code runner.
Object-oriented design for interviews: the framework, design principles and patterns, concurrency, and problem breakdowns you can practice in the code runner.
| Title | Difficulty |
|---|---|
| Design an Expression Evaluator Design an evaluator for arithmetic expressions with operator precedence, unary minus, variables and new operators added at runtime, built as tokenizer, parser and expression tree. | Medium |
| Design an HTTP Router Design an HTTP router with addRoute and callRoute, path parameters, trailing wildcards, a clear match priority (literal over parameter over wildcard), and 404 versus 405 answers. | Medium |
| Design an In-Memory File System Design an in-memory file system with absolute paths, directories and files, mkdir -p, ls, write, append, read, recursive sizes and rm -r, built on the Composite pattern. | Medium |
| Design an In-Memory Search Engine Design an in-memory search engine with datasets, document insert and delete, word and prefix search through an inverted index, and swappable result orderings. | Medium |
| Design an In-Process MapReduce Design a multithreaded MapReduce inside one process: split the input, map on worker threads, shuffle pairs into partitions by key, reduce in parallel, with word count and an inverted index as jobs. | Medium |
| Design an Inventory Management System Design multi-warehouse inventory: on-hand and reserved stock, reservations that are committed or released, a swappable rule for picking warehouses, and low-stock alerts that fire once. | Medium |
| Design an LRU Cache Design a fixed-size cache with a pluggable eviction policy: LRU with a hash map and a doubly linked list, LFU with LRU tie-breaking in O(1), and a thread-safe sharded version. | Medium |
| Design an Online Auction System Design an online auction system with bid rules, auctions that close exactly at their end time through a min-heap of deadlines, per-bidder winnings, and safe concurrent bidding with per-auction locks. | Medium |
| Design an Online Stock Brokerage Design an online brokerage with accounts and cash, market and limit orders that hold funds until they fill, a portfolio valued at live prices, and named watchlists. | Medium |
| Design an Order Management System Design an online shop's order system: all-or-nothing stock reservation, an order lifecycle from placed to delivered, cancellations with refunds, and unpaid orders that expire on their own. | Medium |
| Design an Underground System Design a metro tap-in and tap-out system that tracks riders between stations and answers the average travel time of any route in constant time, with the rules for double taps and missing check-ins. | Medium |
| Design Blackjack Design a blackjack table with a shoe of cards, hands that count aces correctly, betting and turn phases, fixed dealer rules, 3 to 2 payouts, and a path to an online table with many seats. | Medium |
| Design Concurrent Bank Transfers Design a bank where many threads move money between accounts at once, with per-account locks taken in a fixed order so transfers never deadlock and the total is always conserved. | Medium |
| Design Dining Philosophers Let n philosophers share n forks with no deadlock and no starvation, from why "left fork first" gets stuck to a fair waiter that hands out both forks at once. | Medium |
| Design Game Matchmaking Design a matchmaker that groups players by mode (1v1, 2v2, 4v4), region and level, joins an open lobby or creates one, starts full games and splits them into balanced teams. | Medium |
| Design Movie Ticket Booking Design a BookMyShow-style booking system with shows, seat maps, temporary seat holds that expire, confirm and cancel, and safe booking when many users want the same seat. | Medium |
| Design Nested Comments Design a Reddit-style comment tree with replies at any depth, votes, soft deletes, top/new/old sorting at every level, eager versus lazy loading with "load more" markers, and word search. | Medium |
| Design Search Autocomplete Design a search box that suggests the three most popular past sentences for what the user has typed so far, from a full scan to a trie to a trie that caches each prefix's top three. | Medium |
| Design Splitwise Design an expense-sharing app with equal, exact and percent splits, fair rounding of cents, pairwise balances that net out, settle-ups, and a greedy plan that simplifies everyone's debts. | Medium |
| Design Stack Overflow Design a Q&A site with questions, answers and tags, one vote per user per post, accepted answers, reputation that stays correct when votes change, ranked answers and tag search. | Medium |