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.
118 write-ups
| Title | Difficulty |
|---|---|
| Design a Parking Lot Design a multi-level parking lot with spot sizes, fitting rules, tickets on entry, fees on exit through a swappable pricing strategy, and live availability counts. | Medium |
| Design Amazon Locker Design a self-service package locker with locker sizes, best-fit assignment, one-time pickup codes, a hold time after which packages expire, and a courier sweep that takes them back. | Medium |
| Design an Elevator System Design a multi-elevator controller that moves each car with the SCAN (LOOK) algorithm and dispatches every hall call to the car that would arrive first. | Medium |
| Design Chess Design a two-player chess game with piece movement rules, move validation that respects check, checkmate and stalemate detection, and a move history with undo. | Hard |
| Design Connect Four Design Connect Four with gravity drops through column heights, turn checks, wins in four directions found by walking out from the last disc, draws, and room for undo and other board sizes. | Easy |
| 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 |