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 Deadlock Detector Design a lock manager that builds a wait-for graph, detects a deadlock the moment it forms, picks a victim to abort, and hands its locks to the next waiters, safely across threads. | Medium |
| Design a Delayed Task Scheduler Design a ScheduledExecutor-style scheduler: a delay queue ordered by due time, one timer thread that sleeps until the next task, cancellation and fixed-rate repeats. | Medium |
| Design a Digital Wallet Design a Venmo-style wallet with deposits, withdrawals and instant P2P transfers, recorded in an append-only double-entry ledger with statements, refunds and safe concurrent transfers. | Medium |
| Design a Job Scheduler Design a job scheduler that runs immediate, one-off and recurring jobs on a fixed worker pool, with an event loop over timers, clear status tracking, cancellation and room for cron schedules. | Medium |
| Design a Leaderboard Design a game leaderboard that adds points to players, sums the top K totals and resets players, from sorting on every read to a heap to an always-sorted score index, plus ranks, daily boards and scale. | Medium |
| Design a Loading Cache Design a thread-safe cache that loads missing values through a loader, runs one load per key when many threads miss at once, expires entries after a TTL, and never caches failures. | Medium |
| Design a Logging Framework Design a logging framework with levels, appenders and formatters, an async bounded buffer with backpressure policies and flush, and an audit trail that never loses an entry. | Medium |
| Design a Message Queue Design a Kafka-like message queue with partitioned append-only logs, key-based partitioning, consumer groups with rebalancing, committed offsets, time-based retention and thread-safe producers and consumers. | Hard |
| Design a Multi-Stage Pipeline Design an in-process pipeline whose stages run on their own threads, joined by bounded queues for backpressure, with a poison-pill shutdown that finishes every accepted item. | Medium |
| Design a Multithreaded Download Manager Design a download manager that splits files into chunks fetched in parallel by a worker pool, retries failed chunks, supports pause and resume, and reports progress safely across threads. | Medium |
| Design a Multithreaded Web Crawler Design a crawler that follows links on one host with a pool of worker threads, a shared frontier and visited set, robots rules, and a correct way to know when the crawl is done. | Medium |
| 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 Parallel Merge Sort Design a fork/join engine on a fixed thread pool that runs a parallel merge sort and a parallel sum, avoids pool-starvation deadlock, and knows when splitting stops paying off. | Medium |
| 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 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 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 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 |