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.
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.
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.
Group identical files by content, keeping memory bounded while scanning, then add size pre-filtering and an opt-in symlink/min-size policy.
Same starting point as the basic duplicate-finder, then six layers: bounded-memory hashing, size + symlink filters, recursive directory walking, full-content confirmation, per-file error handling, and a persistent hash cache.
Serialize a list of arbitrary strings into a single string and parse it back. Any character is allowed in the strings, including the delimiters - the format must round-trip them all.
An in-memory key-value store that checkpoints its full state to a single string and restores from it. Both keys and values are arbitrary strings - delimiters, newlines, unicode, anything. The on-the-wire format must round-trip them all.
Auto-simulate a turn-based team fight enforcing round order, dying-strike counterattacks, draw detection, and a full time-ordered event log.
Historical-balance lookup (add/deduct stamped at a time, query balance as of t) and FIFO consumption with per-batch expiration - two classes covering the two sides of a credit system.
A single-table in-memory database supporting INSERT and SELECT with WHERE (AND-only equality) and multi-column ORDER BY, with the query results guaranteed deterministic.
Session-based auth: register, login, logout, session TTL, and salted password hashing. Often paired with the TTL token variant.
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.
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).
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. Arbitrary key/value bytes must round-trip across disk intact.
Bounded-memory caching: get it correct, then evict the least recently used, then make every operation O(1), then serve recency queries and TTL expiry.
Courier pay from raw delivery events: pair events into active intervals, pay per active minute, pay a bonus for minutes juggling concurrent deliveries, then survive out-of-order, duplicate, and never-ended events, and finally emit an auditable breakdown.
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.
Tokens issued with a fixed TTL; renew before expiry to extend; count live tokens at time t. Later phases make the count efficient under many issued tokens and add thread safety.
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.
Single-account GPU credit grants with time windows; FIFO partial spending and windowed balance queries.
Cells hold literals or formulas that reference other cells. set_cell must evaluate each cell so get_cell is fast; later levels propagate changes to dependents and reject updates that would form a cycle.
A stateful shell that supports POSIX cd semantics - absolute and relative paths, `.`/`..`, symlink resolution, and cycle detection.
A mutable social graph that has to answer point-in-time history without storing a full copy per snapshot, and rank friends-of-friends recommendations both live and as-of a past snapshot.
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.
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.
A cell becomes infected on step t+1 only if it has at least K infected neighbors right now. Simulate the outbreak, detect when it stalls, and survive boundary and edge shapes.
Count nodes in an n-ary tree using async fan-out: child counts must run concurrently so wall-clock time scales with tree depth, not node count.
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.
Five levels of lowest-common-ancestor questions: on a binary search tree, on general binary trees, from parent pointers alone, across n-ary org charts, and in bulk batches against a static tree.
Group a binary tree's values into vertical columns: basic column grouping first, then a deterministic top-to-bottom row order, then value tie-breaks, then tree shapes deep enough to strain naive traversals.
A nested list of integers gets three contracts - depth-weighted sum, reverse-weighted sum, then a flatten iterator that yields one integer at a time - with nesting deep enough to strain naive traversals.
Five escalating takes on one bracket string: validate it, point editor squigglies at it, mine the longest valid substring, repair a broken file, and validate with a corruptable wildcard.
Parse and compare semver-style version strings, then layer on range constraints (>=, <, ^, ~, x-wildcards).
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.
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, at a scale of millions of combinations.
Evaluate arithmetic expressions as raw text: addition and subtraction first, then multiplication and division, then parentheses, then unary signs and malformed input.
Build a clean merged view of overlapping calendar intervals, then answer the queries production systems ask of it: insert a new interval, intersect two schedules, and find when everyone is free - each level a new access pattern on the same half-open interval model.
One string, four contracts: is it a palindrome, can it become one by deleting at most one character, at most k characters, and what is the exact minimum number of deletions it needs?
Pick one option at random, with each option's chance proportional to its weight - uniform baseline first, then weighted picks, then a picker that tolerates live weight updates, adversarial edge cases, and a 2-D area-sampling generalization.
Return the kth largest element from a stream of scores, where k=1 is the maximum and duplicates count separately. Levels tighten the budget - bounded memory, average-linear time, and answers that stay current as scores keep arriving.