Code you write, not read.
76 interview-style problems you solve in the browser — in Python or TypeScript, with hidden tests that check your answer the moment you hit Run. They are arranged as ladders: each one is an ordered path, so there is always a next problem rather than a wall of them.
The screen
What a technical screen asks before it asks anything else.
Interview classics
The ten problems screens keep asking. Clear these and the warm-up round is covered.
- Fizz Buzz Start here The famous screening question.
- Two SumThe classic warm-up: find the two numbers that add up to a target.
- Valid ParenthesesThe canonical stack problem: decide whether every bracket is closed by the right type, in the right order.
- Min StackA stack that also returns its minimum in O(1) — no scanning.
- 3SumThe rite of passage: every unique zero-sum triplet, no duplicates, no O(n³).
- Merge IntervalsCalendar apps and memory allocators run on this: sort by start, sweep once, grow or close the current block.
- Top-K Frequent ElementsCount, then rank — the two-step pattern behind trending topics and hot-key detection.
- Number of IslandsThe canonical connected-components question.
- Course Schedule (Cycle Detection)Can you finish every course given its prerequisites? The classic "is this dependency graph acyclic?" check a build system runs.
- Word LadderTransform one word into another one letter at a time, every step a real word — a shortest path in a hidden graph, so a job for BFS.
Structures you build
Stop importing them. Write the structure itself, including the probabilistic ones.
- Union-Find (Connected Components) Start here The disjoint-set behind Kruskal’s MST and network connectivity: answer "are these connected?" in near-constant time with union by…
- Implement a TrieThe prefix tree behind autocomplete and spell-check: insert, search, and startsWith in time proportional to word length.
- Bloom FilterA tiny bit-array that answers "have I seen this?" in a fraction of a set’s memory — with occasional false positives but never a f…
- Streaming MedianLatency dashboards do this every second: maintain the median of a stream without re-sorting per event.
- Reservoir SamplingPick k items uniformly at random from a stream of unknown length — one pass, O(k) memory.
- HyperLogLog Cardinality EstimatorCount how many distinct items a stream held — billions of them — using a few kilobytes, not a giant set.
- Skip List Insert & SearchO(log n) search and insert from nothing but linked lists and express lanes — the structure behind Redis sorted sets.
Graphs, strings & parsers
Shortest paths, string matching, and two real parsers — recursion you can defend.
- Dijkstra’s Shortest Paths Start here The algorithm every routing table and map app leans on: single-source shortest paths with non-negative weights.
- A* Pathfinding on a GridThe pathfinder inside games and robots: A* expands nodes by "cost so far + estimated cost to go", so the heuristic focuses the se…
- Matrix ExponentiationRaise a matrix to the n-th power in O(log n) multiplies instead of n — the trick that computes the billionth Fibonacci number alm…
- KMP Failure TableThe precomputation that makes KMP string search run in O(n): for every prefix, the longest proper prefix that is also a suffix.
- Longest Common SubsequenceThe DP behind "git diff" and DNA alignment: the longest subsequence common to two strings (order kept, gaps allowed).
- Expression CalculatorEvaluate an arithmetic string with precedence and parentheses, the way an interpreter does.
- JSON Parser (Recursive Descent)Write the parser behind every API and config file: turn a JSON string into native objects, arrays, numbers, strings, booleans and…
- Mini Regex Matcher (. and *)Implement regex matching with "." and "*" — the classic hard interview problem.
AI engineering
The primitives behind an LLM product, implemented by hand.
Model internals
Softmax to attention: the maths inside the model, in about twenty lines each.
- Softmax Start here The function at the end of every classifier and language model: turn raw scores (logits) into a probability distribution.
- Cross-Entropy LossThe loss that trains almost every classifier and language model.
- Layer NormalizationThe stabilizer wrapped around every Transformer sub-layer: re-center and re-scale a vector to mean 0 and variance 1, then let lea…
- K-Nearest NeighborsThe simplest classifier there is: to label a new point, look at the k closest labeled points and let them vote.
- BPE Merge StepOne step of how every tokenizer vocabulary is built: count adjacent symbol pairs across the corpus, pick the most frequent (ties…
- Single-Head AttentionThe operation at the heart of every Transformer: scaled dot-product attention.
Inference & decoding
How tokens actually come out: temperature, constraints, beams, speculation, KV cache.
- Softmax with Temperature Start here The dial that controls how "creative" a language model is: temperature scales the logits before the softmax — low sharpens toward…
- Constrained Decoding (Logit Masking)How do you force an LLM to emit only valid JSON or a token your grammar allows? Mask the logits: set every disallowed token to −∞…
- Beam Search DecoderGreedy decoding takes the best next token and never looks back — straight into garden paths.
- Speculative Decoding: Accept StepSpeculative decoding speeds up LLM inference: a small draft model proposes tokens, the big target model verifies them in one pass.
- KV-Cache Eviction (Attention Sinks)An LLM’s KV cache grows every token, so long chats must drop old entries without wrecking quality.
RAG & retrieval
Chunk, embed, score, rank, then measure it. The whole retrieval path, implemented.
- Cosine Similarity Start here The measure behind every embedding search and RAG system: how aligned are two vectors, ignoring their length? Dot product over th…
- Semantic Chunker (Token Budget)Before you embed a document for retrieval, split it into chunks that fit a token budget — without slicing a sentence.
- TF-IDFThe scoring that ran search for decades — and still seeds hybrid retrieval today.
- BM25 ScoringThe keyword-ranking function every fancy retriever still has to beat.
- Top-K RetrievalThe core of the "R" in RAG: given a query embedding and a set of document embeddings, return the indices of the k most similar do…
- MMR RerankingTop-k by similarity returns five copies of the same paragraph.
- Token-Level F1The metric behind QA evaluation (SQuAD and friends): how well does a predicted answer overlap a reference as a bag of words? Comp…
Agents & loop engineering
Budget, retry, parse a tool call, close the loop — then review the code an AI wrote.
- Trim History to a Token Budget Start here Every agent turn re-sends the whole conversation, so history must fit the context budget.
- Retry with Exponential BackoffTools time out and APIs rate-limit — a production agent retries without hammering.
- Parse a Tool CallWhen a model wants to act, it emits a call like search(query=cats, limit=5).
- Run the Goal LoopThe engine of loop engineering: attempt the front task, let an independent verifier judge it, retry failures with state untouched…
- Build Your Own Agent LoopStrip an "AI agent" of its mystique and what’s left is a loop: read the model’s next move — tool call or final answer — run the t…
- Write a VerifierIn RL from verifiable rewards, the verifier IS the reward — and a gameable one is worse than none, because every false positive i…
- Spot the Bug in AI CodeAn assistant wrote a chat-history trimmer that looks right, passes the obvious case, and silently drops the system prompt the mom…
- Read the Codebase, Fix the BugThe skill an AI can’t fake for you: drop into unfamiliar code, trace how the pieces call each other, and fix the one that’s wrong…
- Ship or StopA self-improvement loop finished another round and every number on the dashboard went up.
Production & field work
The code that survives real traffic, real data and real customers.
Systems, limits & distribution
Caches, rate limits, breakers, hash rings, and the three distributed-systems primitives.
- LRU Cache Start here The eviction policy behind every size-limited cache: when you run out of room, throw out whatever was used least recently.
- LFU CacheThe cache that evicts what you use least often — and, on ties, least recently.
- Token Bucket Rate LimiterThe algorithm inside most production rate limiters — and it never runs a timer.
- Sliding-Window Rate LimiterAllow at most N requests per rolling window — the rate limiter that guards real APIs.
- Circuit BreakerStop one failing dependency from taking down the fleet: trip after consecutive failures, fail fast while open, probe once after t…
- Consistent Hashing RingHow distributed caches decide which node owns a key — with tiny churn when nodes join or leave.
- Vector Clock MergeVector clocks let processes with no shared time agree on which event caused which.
- CRDT: Grow-Only CounterA counter many replicas increment independently, with no coordination, that always converges to the same total after syncing — a…
- Raft Leader Election (Majority)The heartbeat of the Raft consensus algorithm: a candidate becomes leader only by winning a strict majority of the cluster — the…
Integrations & messy data
Paginate, verify, redact, reconcile: the forward-deployed engineer’s actual week.
- API Pagination Collector Start here The customer’s API returns 100 rows at a time behind a cursor.
- Idempotency Key HandlerNetworks retry.
- Config ValidatorHalf of "it doesn’t work at the customer" is a bad config — a missing key, a string where an int belongs, an env that isn’t allowed.
- Exponential Backoff with Full JitterWhen a customer’s API throws 503s, everyone retrying on the same doubling schedule stampedes it in sync.
- Verify a Webhook SignatureEvery real integration sends signed webhooks — and every FDE has to verify them.
- PII RedactorBefore customer data touches a log line — or a third-party LLM — the personal bits have to go.
- CSV → Schema MapperEvery customer hands you a messy export.
- Data Reconciliation DiffThe customer swears the migration worked.
- Harvest a Flaky Paginated APIThe vendor API is paginated, occasionally 500s, rate-limits without documenting it, and returns overlapping pages when the data m…
- Reconcile Two Systems That DisagreeThe customer is certain the ERP and the CRM agree; they have never checked.
Interview escalations
Five staged rounds that change the requirements mid-solution, like a real on-site.
- Re-Engineer a Legacy ETL Start here You inherit an aggregation nobody can explain and the totals are wrong.
- Repair the Spread TraversalInherited code computes how far something spreads through a contact graph, and the answers are wrong in a way that is invisible o…
- LRU Cache, Constraint by ConstraintThe incremental-coding round, packaged: a cache that becomes bounded, then least-recently-used, then instrumented — each stage in…
- Deep Clone, Constraint by ConstraintThe incremental round on a problem where stage three genuinely breaks the obvious design: copy an object, then nested structures,…
- Rate Limiter, Constraint by ConstraintA third incremental round, where stage two invalidates stage one outright: a fixed-window counter becomes a sliding window, then…
Coding challenges — frequently asked questions
What are these coding challenges?
Each challenge is a classic interview-style problem you solve in your browser. You get a stub, a problem statement with examples, and hidden tests. Write your solution in Python or TypeScript, hit Run, and the tests tell you instantly whether it works — no account, no setup, nothing to install.
How does the code actually run with no server?
Entirely in your browser. Python runs as real CPython compiled to WebAssembly (Pyodide); TypeScript is transpiled on the fly. The site is a static site with no backend, so your code never leaves your machine.
Can I see the solution if I get stuck?
Yes. Every challenge has hints and a one-click "Reveal solution" button that drops a clean, commented reference implementation into the editor. The goal is to build intuition — struggle first, then compare your approach with the canonical one.
Do these help with coding interviews?
Yes. The challenges target the array, string, hash-map, stack and two-pointer patterns that show up constantly in technical screens. Solving them by hand — then checking against hidden tests — is far more durable practice than reading solutions. Many also cross-link to an animated visualizer so you can see the underlying algorithm work.
Are the challenges free?
Completely free, with no sign-up. Your solved progress is saved locally in your browser so the catalog remembers what you have finished.