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 Tic-Tac-Toe Design tic-tac-toe on an N by N board with turn checks, rejected moves, wins and draws, and a win check that costs O(1) per move thanks to running line counters. | Easy |
| Build a Semaphore, Latch and Barrier Build a counting semaphore, a countdown latch and a reusable barrier from one lock and a condition variable, and learn the wait loop behind every blocking primitive. | Medium |
| Coordinate Threads in Order Make threads take turns in a fixed order with one recipe, shared turn state plus a condition variable, applied to print in order, FooBar, zero-even-odd, H2O and multithreaded FizzBuzz. | Easy |
| Design a Blob Store Design an S3-like blob store with buckets, versioned objects and delete markers, fixed-size chunks for downloads, multipart uploads that arrive in any order, and prefix listing. | Medium |
| Design a Bloom Filter Design a Bloom filter with a packed bit array, k positions from double hashing, sizing from the expected item count and error rate, and a clear account of false positives. | Easy |
| Design a Board Game Framework Design one engine that runs many turn-based games, with Ludo and Uno as plug-in rules, a shared turn check and move log, online rooms, and replays rebuilt from the moves. | Medium |
| Design a Bounded Blocking Queue Design a fixed-size FIFO queue that makes producers wait when it is full and consumers wait when it is empty, built from one lock and two condition variables. | Medium |
| Design a Calendar Design a shared calendar with recurring events stored as rules plus one-off edits and deletes, reminders fired by a clock tick, and team events that need N free members within working hours. | Medium |
| Design a Circuit Breaker Design a circuit breaker that fails fast when a dependency is down: closed, open and half-open states, failure and success thresholds, a lazy timeout, and safe use from many threads. | Medium |
| Design a Clinic Appointment System Design a clinic booking system where doctors publish one-hour slots, patients search by specialty, book and cancel, and a first-come waitlist hands freed slots to the next patient. | Medium |
| Design a Collaborative Document Editor Design a Google Docs style document server: concurrent edits rebased onto the latest text, a version history you can read at any point, and nested comments anchored to text that moves. | Hard |
| Design a Concurrent Hash Map Design a thread-safe hash map from scratch, from one global lock to lock striping, with atomic putIfAbsent and increment, a cheap size counter, and resizing without deadlock. | Hard |
| Design a Connection Pool Design a database connection pool with a size limit, callers that wait in line with a timeout, idle timeouts, dead connections dropped and replaced, and a thread-safe version. | Medium |
| Design a Customer Support Chat Design an Intercom-style support inbox with conversations routed to agents by capacity, helper agents who join, read receipts with per-user watermarks, and toggled emoji reactions. | Medium |
| 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 Feature Flag Service Design a feature flag service with kill switches, targeting rules, sticky percentage rollouts, a versioned config with per-flag rollback, and watchers that never miss a change. | Medium |
| Design a Flight or Train Booking System Design a flight booking system with route search, seat classes, group bookings, automatic seat numbers, refunds through a swappable policy, and airline-side flight cancellations. | Medium |
| Design a Food Delivery Service Design a DoorDash-style food delivery service with an order life cycle, nearest-courier assignment behind a swappable strategy, a wait queue when no courier is free, and cancellations. | Medium |