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 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 Skiplist Design a skip list with search, add and erase in O(log n) on average: a sorted linked list with express lanes, random node heights you can replay, duplicates, and the follow-ups on maps, ranks and threads. | Hard |
| Design a Smart Thermostat Design a smart thermostat with off, heat, cool and auto modes, a daily schedule with manual holds, several room sensors, and a deadband so the furnace does not flick on and off. | Easy |
| 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 Spreadsheet Design a spreadsheet whose cells hold numbers or formulas, with a dependency graph that recalculates every affected cell once in topological order and rejects circular references. | Hard |
| Design a Tag Management System Design the tagging behind GitHub issues and Jira tickets: add and remove tags with one spelling each, list an item's tags, search by all or any tags with an inverted index, and rank popular tags. | Easy |
| 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 Traffic Light Controller Design the controller for a two-road crossroads: green and yellow phases on timers, a rule that two roads are never green at once, and a pedestrian button that adds a walk phase. | Easy |
| Design a Traffic-Light Intersection Design a thread-safe controller for a two-road intersection: cars from four directions, one green road at a time, switching only when needed, and no crashes or deadlocks. | Easy |
| 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 URL Shortener Design an in-memory URL shortener with counter-based base62 codes, user-chosen aliases that share the code space, and links that expire after a time to live. | Easy |
| 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 Vending Machine Design a coin-operated vending machine with products, a coin box that pays exact change, a cancel button and a service mode for restocking, using the State pattern. | Easy |
| 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 |