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 Pub/Sub System Design an in-memory publish/subscribe broker with topics, a bounded inbox per subscriber, a drop-oldest policy for slow readers, and async delivery by dispatcher threads. | Medium |
| 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 Request Batcher Design a request batcher that groups calls from many threads into one backend call, flushes when a batch is full or its time window ends, and hands every caller its own result. | Medium |
| Design a Restaurant Management System Design a restaurant point-of-sale system that seats parties at the best table, sends order items to a first-in, first-out kitchen queue, tracks each ticket's status and closes the bill. | 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 Rule Engine Design a fraud rule engine for card payments, with conditions composed from AND, OR and NOT, velocity rules, the most severe action winning, and safe rule changes under concurrent load. | 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 Social Network Design a Facebook-style social network with friend requests, posts, likes, comments, a news feed merged from friends' posts, and LinkedIn-style connection degrees. | Medium |
| Design a Text Editor Design a text editor with a cursor, typing and backspace, cursor moves, and undo/redo built from command objects, on a two-stack buffer that keeps every edit fast. | 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 Top-K Tracker Design a tracker for the top K songs, hashtags or posts over a sliding time window, with per-second buckets, a size-K heap, per-source charts and the follow-ups on scale and threads. | Medium |
| Design a Unix File Search Design a find-style file search with filters by name, extension, type and size that combine with AND and OR, a lazy depth-first tree walk, and an ls -R listing. | 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 Access Control System Design role-based access control for a multi-tenant B2B app, with roles per organization, wildcard permissions, role inheritance and IAM-style allow and deny rules. | Medium |
| Design an Airport Runway Controller Design the controller that hands out an airport's runways, with a waiting queue where emergencies beat landings and landings beat takeoffs, cancellations, and clearances worked out from explicit timestamps. | 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 API Aggregator Design a flight price aggregator that queries many providers in parallel behind one interface, enforces a deadline, returns partial results with per-provider status, and skips providers that keep failing. | Medium |
| Design an ATM Design an ATM with card and PIN sessions as a State pattern, card blocking after wrong PINs, all-or-nothing cash dispensing by note, deposits, and safe concurrent withdrawals from one account. | Medium |