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 Database Design an in-memory database with typed tables, SQL-like select, update and delete with WHERE and ORDER BY, and sorted indexes that stay in sync and speed up queries without changing results. | Hard |
| 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 Order Matching Engine Design a stock exchange's order book and matching engine with limit and market orders, price-time priority, partial fills and cancels, matched in batch first and then as a stream. | Hard |
| 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 Battleship Design two-player Battleship with validated ship placement, a placement-then-battle game phase, shots that report miss, hit and sunk in constant time, and room for a computer opponent. | Easy |
| 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 Browser History Design the back and forward buttons of a browser tab: visit clears forward pages, back and forward move several steps at once, built from one stack to two stacks to an array with a cursor. | Easy |
| 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 Minesweeper Design Minesweeper: mine placement kept outside the game, neighbor counts, flood reveal with a queue, flags, and win or lose detection with a counter instead of a board scan. | Easy |