Master distributed systems
& client-side engineering.
Browse system design breakdowns, core concepts, and practical coding challenges. Run code in our in-browser compiler, review active recall cards, and complete mock interviews.
- Image Pipeline - Recursive Batch(premium)
The directory-scale follow-up to Image Processing Pipeline. Walk a tree of images (Large/ and Small/ subfolders), load transform lists from a folder of JSON files, and apply every transform to every image in parallel - preserving the source subdirectory layout in the output and isolating per-combination failures. The fan-out the interview actually scales to millions of combinations.
Practicalmedium45m1mo - Image Processing Pipeline(premium)
Apply ordered image operations (resize, rotate, crop, blur, grayscale) with Pillow - one image, then every image-by-pipeline combination, then a thread pool, then partial-failure isolation, then directory discovery. A throughput and fault-tolerance problem dressed as image manipulation.
Practicalmedium45m1mo - KV Store - Persistent(premium)
The durability follow-up to the in-memory key-value store. Snapshot the store to disk and restore it, then make the write crash-safe with an atomic temp-file rename, then add an append-only write-ahead log so writes made since the last snapshot survive a crash. Length-prefix encoding keeps arbitrary key/value bytes intact across disk.
Practicalmedium40m1mo - KV Store - Thread-Safe(premium)
The concurrency follow-up to the in-memory key-value store. Many threads call put / get / erase on one shared store at once; make it correct under contention, then refine from a single global lock to a reader-writer lock and finally to atomic compound operations (get_and_set, compare_and_swap).
Practicalmedium40m1mo - Web Crawler(premium)
Build a web crawler on top of an injected get_links helper - breadth-first crawl with deduplication, then same-domain and fragment handling, then a concurrent version with a thread pool and a shared visited set, and finally depth and global rate limits. A concurrency problem disguised as a graph traversal.
Practicalhard50m1mo - Follow Graph with Snapshots(premium)
A mutable social graph that has to do three hard things at once - answer point-in-time history without copying the world on every snapshot, and rank friends-of-friends recommendations both live and as-of a past snapshot.
Practicalhard60m1mo - KV Store - Chunked Persistence(premium)
The chunked-persistence follow-up to KV Store Serialize/Deserialize. Serialize a key-value store with a fixed-width binary (TLV) format, then split the blob into 1 KB chunks and checkpoint it to an S3-style object store - with the chunk count carried in a chunk header, no separate metadata object.
Practicalhard50m2mo - GPU Credit Tracker: Variant 2(premium)
Single-account GPU credit grants with time windows; FIFO partial spending and windowed balance queries.
Practicalmedium40m2mo - Async N-ary Cluster Count(premium)
Count nodes in an n-ary tree using async fan-out. The recursion is trivial; the real test is fanning out child queries concurrently so wall-clock time scales with tree depth, not node count.
Practicalmedium30m2mo - Authentication Manager - Sessions(premium)
Session-based auth with register, login, logout, session TTL, and salted password hashing. Paired with the TTL token variant in OpenAI loops.
Practicalmedium35m2mo - Authentication Manager - TTL(premium)
LeetCode 1797. Tokens issued with a fixed TTL; renew before expiry to extend; count live tokens at time t. Later phases push the count to amortized O(1) and add thread safety.
Practicalmedium30m2mo - Disease Spread in a Grid(premium)
A cell becomes infected on step t+1 only if it has at least K infected neighbors right now. Looks like rotting oranges but the K threshold turns it into a wave simulation with stall detection.
Practicalmedium40m2mo - Encode and Decode Strings(premium)
Serialize a list of arbitrary strings into a single string and parse it back. Any character is allowed in the strings, including the delimiters - length-prefix framing is the only safe answer.
Practicaleasy25m2mo+3
- Find Duplicate Files(premium)
Group identical files by content. Stream-hash to keep memory bounded, then add size pre-filtering and an opt-in symlink/min-size policy.
Practicalmedium45m2mo+4
- Find Duplicate Files - Extended(premium)
Same starting point as the basic duplicate-finder, then six layers: streaming hash, size + symlink filters, recursive directory walking, two-pass hashing, per-file error handling, and a persistent hash cache.
Practicalhard90m2mo - GPU Credit Tracker: Variant 1(premium)
Two shapes that often combine in the same interview. Historical-balance lookup (add/deduct stamped at a time, query balance as of t) and FIFO consumption with per-batch expiration.
Practicalmedium45m2mo - In-Memory Database with SQL-like Operations(premium)
A single-table in-memory database supporting INSERT and SELECT with WHERE (AND-only equality) and multi-column ORDER BY. The stable-sort trick is the trade tool.
Practicalmedium40m2mo - In-Memory Key-Value Store(premium)
Build a key-value store as a single class. Layer on prefix-scan, TTL, then gzip persistence - each phase is its own surface area on top of the previous one.
Practicalmedium60m2mo - IPv4 Address Iterator and CIDR(premium)
Convert dotted-quad to 32-bit integers and back, iterate forward and reverse over a range, parse CIDR notation, and decompose an arbitrary range into the minimum CIDR cover.
Practicalmedium40m2mo - KV Store - Serialize and Deserialize(premium)
The most-reported OpenAI coding problem. An in-memory key-value store where both keys and values are arbitrary strings - delimiters, newlines, unicode, anything. The on-the-wire format must round-trip them all.
Practicalmedium45m2mo - Meeting Rooms(premium)
Given a list of half-open meeting intervals, find the minimum number of conference rooms; later phases assign specific room IDs and add capped capacity with priority eviction.
Practicalmedium35m2mo+9
- Monster Team Battle(premium)
Auto-simulate a turn-based team fight enforcing round order, dying-strike counterattacks, draw detection, and a full time-ordered event log.
Practicalmedium35m2mo - Resumable Iterator(premium)
An iterator whose state can be captured and replayed - stop iterating, save the state, hand it to a fresh iterator, and continue from exactly where you left off. Layer composition over flat and nested data.
Practicalmedium40m2mo - Sampling Profiler → Trace Events (Sample/Event types)(premium)
A typed variant of the stack-samples problem - Sample and Event are dataclasses, comparisons are by value, and the contract is exposed via the imports the test file requires.
Practicalhard60m2mo - Semantic Version Comparison and Constraints(premium)
Parse and compare semver-style version strings, then layer on range constraints (>=, <, ^, ~, x-wildcards). The lexicographic-vs-numeric comparison trap is the centerpiece.
Practicalmedium35m2mo - Spreadsheet with Formulas(premium)
Cells hold literals or formulas that reference other cells. set_cell evaluates and caches each cell so get_cell is O(1); later levels propagate changes to dependents and reject updates that would form a cycle.
Practicalhard50m2mo - Stack Samples → Trace Events
A sampling profiler captures call stacks at fixed intervals. Convert those snapshots into start/end span events. Three phases - basic diff, recursion, then a min-consecutive-count debounce.
Practicalhard60m2mo - Time-Based Key-Value Store(premium)
A key-value store with timestamped writes. Read at time t returns the latest value written at or before t; later phases add arbitrary-order inserts and range queries.
Practicalmedium35m2mo+9
- Unix cd with Symlink Resolution(premium)
A stateful shell that supports POSIX cd semantics - absolute and relative paths, `.`/`..`, symlink resolution, and cycle detection. Looks simple, hides a stack-and-recursion problem.
Practicalmedium45m2mo - Valid Parentheses
Stack-walk a bracket string to validate it, then localize the first error, then find the longest valid substring (LC 32).
Practicalmedium35m2mo+12