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 a Multi-Level Cache Design an L1/L2 cache in front of a slow store, with LRU eviction per level, promotion on reads, write-through and write-back policies, and a distributed version with consistent hashing and quorums. | Hard |
| Design a Notification Service Design a multi-tenant notification service with per-tenant templates, email/SMS/push channels, a priority queue drained by workers, and retries with exponential backoff. | Medium |
| Design a Payment System Design a payment orchestrator that routes each payment to a provider by method with failover, moves it through a strict state machine, and makes client retries safe with idempotency keys. | Medium |
| Design a Pizza Ordering System Design a pizza shop's ordering system with sizes and toppings, per-pizza billing, and swappable promotions such as BOGO Tuesday and happy hour, picking the best deal for the customer. | Easy |
| Design a Product Rating System Design star ratings and written reviews for an online store: one rating per user, O(1) averages from a running sum, reviews sorted by newest, stars or helpful votes, and a best-rated list. | Easy |
| Design a Rate Limiter Design an in-process rate limiter with per-client limits and pluggable fixed window, sliding window and token bucket algorithms, then make it safe for many threads. | Medium |
| Design a Ride-Sharing Service Design an Uber-style ride-sharing core with ride types, nearest-driver matching behind a strategy, a trip state machine, distance-and-time fares and cancellation fees. | Medium |
| Design a Shopping Cart with Coupons Design an e-commerce cart with stock checks, automatic buy-X-get-Y offers, coupons scoped to a cart, product or seller with validity windows and usage limits, and an all-or-nothing checkout. | Medium |
| Design a Thread Pool Design a fixed-size thread pool with a bounded task queue, futures that carry results and errors, a pluggable rejection policy, and a graceful shutdown that finishes queued work. | Medium |
| Design a Vehicle Rental System Design a car and bike rental system with vehicle types, time-range bookings without double-booking, pick-ups and returns, duration pricing with late fees, and constant-time rented counts. | Medium |
| Design a VM Provisioning System Design the scheduler behind a small cloud: hosts with CPU and memory, VMs placed by a swappable first-fit, best-fit or spread policy, release of capacity, and draining hosts for maintenance. | Medium |
| Design a Webhook Dispatcher Design a service that sends events to subscribers' URLs, with event-type subscriptions, signed requests, retries with exponential backoff, and dead letters that can be replayed. | Medium |
| Design an Alerting System Design an alerting engine with metric threshold (query) checks and health checks, an OK / PENDING / FIRING state machine with a "for" duration, and notifications on firing and resolving. | Medium |
| Design an Employee Attendance System Design an attendance tracker with badge check-in and check-out, several sessions a day, night shifts split at midnight, a daily present or half-day status, and a per-employee report over a date range. | Easy |
| 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 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 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 |