Solving a puzzle proves you can write one function. A project proves you can build something. Every puzzle here grows into a real system: a rate limiter, a cache, a search index, a route planner. Your solution is the first stage, three more stages stack under it, each a real algorithm with its own tests, and the finished pipeline downloads as a program you can run, read and talk about in an interview.
68 projects across 11 pattern families, built from 576 puzzles.
Build a game engine from scratch: ten milestones from a blank window to collision, physics, A* and a level editor, powered by the Game Development puzzles.
Open Blueprint Studio: wire the algorithms behind these projects together on a node canvas and design projects of your own.
Open any puzzle and press Software Engineer. The project it grows into is chosen from the pattern your solution uses, so the function you wrote is the core of the system rather than a warm-up that gets thrown away. Each of the three stages under it has a brief, a reason it belongs in this system, and its own tests. You can snap a stage together as a jigsaw, fill in its blanks, or type it from scratch, in JavaScript, Python or C++.
These are the same pipelines that run inside software you use every day, made small enough to finish in an evening. A deduplicator is the idempotency check behind payment APIs. A quantile rig is how latency percentiles are reported. A search index is the inverted index behind site search. Every project says where it runs today and gives one concrete way to take it further, with something to build and something to measure.
A good portfolio project runs, has tests, and gives you something specific to say when an interviewer asks about it. Each download is a folder with one source file per stage, a pipeline that connects them, a test suite and a README describing the architecture, with no dependencies to install. The take-it-further step is where it becomes yours: a measured result, such as the hit rate of two cache policies on the same trace, is the kind of detail that makes a project worth asking about.
The event stream sends everything twice. This decides what is really new. Stages: your puzzle, then Drop the repeats, Find what changed, Lay out the table.
Where it runs today: Every payment API and message queue has this pass. Stripe stores an idempotency key for each request so a retried charge is never taken twice, and Kafka's idempotent producer drops the duplicate writes that network retries create.
Take it further: Make it hold across restarts: persist the seen keys with an expiry, measure how much memory a day of keys costs, and find the point where putting a Bloom filter in front of the set starts to pay for itself.
Grows from: Majority Element, Longest Unique Substring, Isomorphic Strings.
Which keys are getting hammered, ranked, in one pass over the event stream. Stages: your puzzle, then Index the events, Tally by key, Bucket it into a histogram.
Where it runs today: Redis ships a hot key finder (redis-cli --hotkeys), and databases and CDNs watch for the same thing, because one hammered key can overload a single shard while the rest of the cluster sits idle.
Take it further: Count with a fixed amount of memory: replace the exact tally with a Count-Min Sketch or the Space-Saving algorithm, and measure how wrong the top ten gets as you give it less memory.
Grows from: Cross-Matter Conflict, Verdict Reached?, Count Accidentals.
Two events a typo apart are the same event. This proves it. Stages: your puzzle, then Drop the repeats, Match near-duplicates, Decide whether to shout.
Where it runs today: Search engines drop near-duplicate pages before indexing them, teams training large language models remove near-duplicate documents from their training data, and CRMs merge customer records that differ by a typo.
Take it further: Scale past comparing every pair with MinHash and locality-sensitive hashing, the technique used to deduplicate web-scale datasets, and compare its recall with your edit-distance version on the same data.
Grows from: Was It Worth It?, Valid Anagram, Count Words.
Group the raw event stream into sessions and report what each one did. Stages: your puzzle, then Drop the repeats, Split into sessions, Draw the timeline.
Where it runs today: Product analytics tools group raw events into sessions with an inactivity timeout (Google Analytics uses thirty minutes by default), and the session is the unit most engagement metrics are built on.
Take it further: Sessionize a live stream instead of a finished log: close each session on a timer as events arrive, and decide what to do with events that show up late and out of order.
Grows from: Rhyme Scheme, Count Rhyming Pairs, Precision.
Keep the hot events in memory and evict the rest by hand. Stages: your puzzle, then Cache the hot events, Keep a running total, Draw the chart.
Where it runs today: Almost every large web service puts an in-memory cache such as Redis or Memcached in front of its database, and the hit rate is one of the first numbers on its dashboard.
Take it further: Compare eviction policies on a real access trace: LRU, LFU and newer designs such as S3-FIFO. Plot hit rate against cache size for each and see where they disagree.
Grows from: Contains Duplicate, Remove Duplicates from Sorted List, Dedupe Email List.
Find the events that pair off, and shout about the ones that do not. Stages: your puzzle, then Find the matching pair, Flag the outliers, Decide whether to shout.
Where it runs today: Banks, payment processors and accounting teams reconcile every day, matching each bank transaction against an internal ledger entry and escalating whatever is left unmatched.
Take it further: Match fuzzy pairs: amounts that differ by a fee, dates a day apart, references with typos. Then measure how many false matches each relaxation lets through.
Grows from: Where Are They Now?, Move Zeroes, Trapping Rain Water.
Spot the worst stretch of value, not the worst single event. Stages: your puzzle, then Peak over a window, Bucket the value, Bucket it into a histogram.
Where it runs today: Fraud teams, DDoS protection and on-call alerting all look for the worst stretch rather than the worst single event, because attacks and outages show up as bursts.
Take it further: Run it on a live stream with a fixed-size window, alert within one window of a burst starting, and tune the window length against the number of false alarms.
Grows from: Merge Two Sorted Lists, 1D Convolution, Max Pooling (1D).
Raw value is unplottable. This makes it a line somebody can read. Stages: your puzzle, then Smooth the value, Put it on one scale, Draw the chart.
Where it runs today: Monitoring dashboards smooth noisy metrics with moving averages before anyone reads them, and the same smoothing is behind stock charts and the trend lines in fitness apps.
Take it further: Compare a simple moving average with an exponentially weighted one: which reacts faster to a real change, and which hides a short spike you needed to see?
Grows from: The Number Goes Stale, Your New Rating, The Short Way Round.
Accept what you can serve and drop the rest, on purpose. Stages: your puzzle, then Throttle the event stream, Work out the retry delays, Summarise in a sentence.
Where it runs today: Every public API rate-limits its callers. GitHub's API reports your remaining limit in response headers, and well-behaved clients back off exponentially instead of hammering a server that is already struggling.
Take it further: Add a token bucket next to the sliding window, then simulate a thousand clients retrying at once and show how adding random jitter to the backoff stops them colliding.
Grows from: Two Sum (Sorted), Shrink the Number, Strip Out a Value.
Every k-event stretch, summarised, so nothing hides in the average. Stages: your puzzle, then Peak over a window, Merge overlapping spans, Draw the timeline.
Where it runs today: Service level objectives are measured this way: error budgets are checked over rolling windows so a bad hour cannot hide inside a good month, and breaching windows are merged into one incident.
Take it further: Add multi-window burn-rate alerting from Google's SRE workbook, which pages on a fast burn over a short window and a slow burn over a long one, and compare its false alarms with a single threshold.
Grows from: Feet to Inches, Flatten Feature Map, Find the Stutter.
Only what changed since last time, which is all anybody wanted. Stages: your puzzle, then Rank the events, Find what changed, Lay out the table.
Where it runs today: Change data capture tools such as Debezium stream only the database rows that changed, and file sync apps send only what changed since the last sync.
Take it further: Compute the diff in one pass over two sorted streams without loading either one fully into memory.
Grows from: Shuffle Without Bias, Valid Palindrome, Total Payroll.
Pair the events off from both ends until nothing is left over. Stages: your puzzle, then Find the matching pair, Rank the events, Lay out the table.
Where it runs today: Ride-share apps pair riders with drivers, exchanges match buy and sell orders, and dating apps pair profiles, and every one of them needs to know who was left unmatched.
Take it further: Make the matching stable, so no rider and driver both prefer each other over their assigned partners. That is the Gale-Shapley algorithm behind medical residency matching.
Grows from: Container With Most Water, Insertion Sort, K Closest to a Target.
Keep the events in order so a new one lands without a re-sort. Stages: your puzzle, then Find the slot, Merge the event streams, Lay out the table.
Where it runs today: Databases keep data sorted so new rows land in place: B-trees in PostgreSQL and MySQL, and LSM trees in RocksDB and Cassandra, which merge sorted runs on disk exactly the way the merge stage here does.
Take it further: Turn it into a tiny LSM tree: buffer writes in memory, flush sorted runs, merge them in the background, and measure write throughput against an array you keep sorted on every insert.
Grows from: First Occurrence, Last Occurrence, Search a Sorted Grid.
Find the first bad event in log n steps, the way git bisect does. Stages: your puzzle, then Find the slot, Find what changed, Write the CSV.
Where it runs today: git bisect finds the commit that introduced a bug in log n steps, and large engineering teams run the same search automatically over their CI history when a test starts failing.
Take it further: Handle flaky tests: a probe that fails one time in ten breaks plain bisection, so repeat probes and treat each answer as a probability rather than a yes or no.
Grows from: Where Would It Go?, Guess the Number, Closest Value.
Percentiles over the event stream without holding all of it. Stages: your puzzle, then Rank the events, Bucket the value, Bucket it into a histogram.
Where it runs today: Latency is reported in percentiles (p50, p95, p99) rather than averages, and monitoring systems such as Prometheus build those percentiles from bucketed histograms instead of storing every request.
Take it further: Replace the fixed buckets with a streaming sketch such as t-digest or DDSketch, and measure the error at p99 for a fraction of the memory.
Grows from: Which Two Moments?, Binary Search, Bubble Sort.
Reject malformed event stream at the door, before it corrupts the store. Stages: your puzzle, then Validate the nesting, Checksum the event stream, Decide whether to shout.
Where it runs today: API gateways and data pipelines validate payloads before accepting them, because one malformed record that slips through can poison a whole downstream table.
Take it further: Validate JSON against a JSON Schema instead of checking brackets alone, and report every error in a batch rather than stopping at the first.
Grows from: Caesar Cipher, Redaction Count, Simplify a Path.
Operators make mistakes. This lets them take one back. Stages: your puzzle, then Undo the last change, Keep a running total, Render the report.
Where it runs today: Every editor from VS Code to Figma keeps an undo stack, and spreadsheets recompute every dependent total after an undo, exactly the way the running total here does.
Take it further: Add redo, then make it collaborative. Two people undoing at the same time is the problem CRDTs and operational transformation were invented to solve.
Grows from: Valid Parentheses, Reverse Linked List, Next Greater Element.
Rebuild the current state by replaying every change that made it. Stages: your puzzle, then Undo the last change, Checksum the event stream, Decide whether to shout.
Where it runs today: Databases and event-sourced systems rebuild state by replaying a log: PostgreSQL replays its write-ahead log after a crash, and Redux DevTools replays actions to reproduce a bug.
Take it further: Add snapshots so a replay starts from the latest checkpoint instead of the beginning, and measure recovery time as the log grows.
Grows from: Only the Last Few, Tanh Activation, Perlin's Fade Curve.
A cache with a hard memory ceiling and an eviction policy you wrote. Stages: your puzzle, then Cache the hot events, Bucket the value, Bucket it into a histogram.
Where it runs today: Browsers, operating system page caches and CDNs evict the least recently used entries when memory runs out, and the eviction pattern is how teams decide whether more memory is worth buying.
Take it further: Make it concurrent: serve reads and writes from several threads without one global lock, the problem high-performance caches such as Caffeine are built around.
Grows from: Recently Used, Find the Chorus, Recycle the Bullets.
Hold the last n events and let the older ones go. Stages: your puzzle, then Undo the last change, Smooth the value, Draw the chart.
Where it runs today: Audio players, network stacks and telemetry agents keep the last n samples in a ring buffer so memory never grows, and the running average over that buffer is what a live gauge shows.
Take it further: Make the buffer lock-free for one producer and one consumer, the design used in audio and trading systems, and measure throughput against a locked version.
Grows from: Average Order Value, Total Billable Minutes, Argmax (Predicted Class).
Read the nested event stream and actually compute what it says. Stages: your puzzle, then Validate the nesting, Evaluate the expression, Summarise in a sentence.
Where it runs today: Calculators, spreadsheet formulas and programming language interpreters check nesting and then evaluate expressions with a stack.
Take it further: Add operator precedence with the shunting-yard algorithm, so input can be written the normal way with infix operators.
Grows from: Do They Rhyme?, Longest Line, Ctrl+Z in the Level Editor.
Fast lookup that also keeps the events in order, which a set will not. Stages: your puzzle, then Keep a sorted index, Page the results, Lay out the table.
Where it runs today: Database indexes are ordered so they can answer range queries and paging, and well-designed APIs page with a cursor that remembers where the last page stopped.
Take it further: Replace offset paging with cursor paging, and show why the offset version gets slower and returns duplicates when new rows are inserted while someone is scrolling.
Grows from: Sum of Tree Nodes, Level Up, Integer Square Root.
Suggest as they type, from the events you already know about. Stages: your puzzle, then Suggest as they type, Make the keys URL safe, Render the report.
Where it runs today: Search boxes, code editors and address bars suggest from prefixes as you type, and every suggestion becomes a link built from a URL-safe slug.
Take it further: Rank suggestions by popularity and recency instead of alphabetically, then add typo tolerance so a misspelled prefix still finds the right result.
Grows from: Invert Binary Tree, Reverse a String, Level Order.
Organise the events into a hierarchy and query it. Stages: your puzzle, then Keep a sorted index, Split the events in two, Write the digest.
Where it runs today: Product catalogs, file systems and org charts are all hierarchies, and the most common question asked of any of them is what sits under this branch.
Take it further: Store the tree in SQL, query it with a recursive common table expression, and compare query times against a materialized path layout.
Grows from: Count Tree Nodes, De Casteljau's Algorithm, Preorder Walk.
Roll the totals up the tree, level by level, to one number at the top. Stages: your puzzle, then Keep a sorted index, Keep a running total, Render the report.
Where it runs today: Org charts roll headcount up to each manager, cloud bills roll costs up from resources to projects to the whole company, and disk usage tools roll file sizes up to folders.
Take it further: Roll up incrementally, so one changed leaf updates only its ancestors instead of the whole tree.
Grows from: Max Depth of Binary Tree, Where Is the Sword, Really?, What Does the Guard Do?.
Who can get to whom, and in how few hops. Stages: your puzzle, then Fewest hops between events, Rank the events, Write the CSV.
Where it runs today: LinkedIn's first, second and third degree connections are a breadth-first search, and security teams use the same sweep to see which machines an attacker could reach from a compromised one.
Take it further: Search from both ends at once and measure how many fewer nodes a bidirectional search visits on a large social graph.
Grows from: Number of Islands, Max Area of Island, BFS Distances.
Work out a safe order, and refuse politely when there is not one. Stages: your puzzle, then Work out the build order, Reject the bad events, Print the map.
Where it runs today: Package managers such as npm and pip, build tools such as Bazel, and spreadsheets all put work in dependency order, and all of them have to report a cycle clearly instead of hanging.
Take it further: Resolve versions as well as order: when two packages need incompatible versions of a third, explain the conflict in a sentence a developer can act on.
Grows from: Minimax Game Value, Is Target Reachable?, How Many Islands of Routers.
Cheapest is not fewest hops once the links have a cost. Stages: your puzzle, then Cheapest route, Rank the events, Print the map.
Where it runs today: Map apps, routing protocols such as OSPF and delivery dispatch systems find the cheapest path over a weighted graph, then offer the next-best alternatives.
Take it further: Add A* with a distance heuristic and measure how many fewer nodes it explores than Dijkstra's algorithm on a grid map.
Grows from: Chase the Player, How Many Rounds to Build It.
One event fails. Work out exactly what else goes with it. Stages: your puzzle, then Work out the build order, Fewest hops between events, Print the map.
Where it runs today: Reliability teams map service dependencies to know what breaks when one service fails, and cloud providers' public incident reviews trace exactly this kind of cascade.
Take it further: Weight the edges by traffic, find the single failure that would hurt the most users, and propose where a cache or a fallback would shrink the blast radius.
Grows from: Shortest Path (BFS), Detect Dependency Cycle, Topological Order.
Find the connected groups in the event stream and size them. Stages: your puzzle, then Count the regions, Rank the events, Draw the chart.
Where it runs today: Image tools find connected regions to select objects, fraud teams find rings of linked accounts, and epidemiologists group cases into outbreak clusters.
Take it further: Switch to union-find so new connections can be added one at a time, without re-running the whole flood fill each time.
Grows from: Flood Fill, Spiral Matrix Order, Find the Word.
Count what is connected on the map, and say how much of it there is. Stages: your puzzle, then Count the regions, Put it on one scale, Print the map view.
Where it runs today: Satellite and drone imagery is segmented into connected regions to measure things like flood extent, field boundaries and wildfire burn areas.
Take it further: Run it on a real black and white image, then compare 4-connectivity with 8-connectivity and show how the region count changes.
Grows from: 2D Convolution.
Flatten the grid the way the file format wants it. Stages: your puzzle, then Read the grid in order, Put it on one scale, Print the map view.
Where it runs today: Image formats, GPUs and map servers store 2D data in specific traversal orders, and web maps serve the whole world as standardized tiles.
Take it further: Export in Z-order (Morton order) instead, and measure how much closer it keeps neighboring cells in memory compared with row order.
Grows from: Net Profit, Transpose a Melody, Causal Attention Mask.
Turn the grid into something a person can look at and act on. Stages: your puzzle, then Read the grid in order, Bucket the value, Print the map view.
Where it runs today: Click heatmaps on websites, temperature maps of server racks and GitHub's contribution graph all band raw counts into a few colors so a person can read them at a glance.
Take it further: Pick the bands from quantiles instead of fixed thresholds, and show how one outlier stops washing every other cell out.
Grows from: Count Land Cells, Mixture-of-Experts Router, Bresenham's Line.
Top value, live, without sorting the whole event stream every time. Stages: your puzzle, then Keep the top value, Find what changed, Lay out the table.
Where it runs today: Games and fitness apps keep live leaderboards, often in a Redis sorted set, and showing who moved since the last update is what brings people back.
Take it further: Keep only the top k in a min-heap while handling millions of score updates, then add time-windowed boards for today and this week.
Grows from: Merge Sort, Top-K Spenders, Three Depots, One Manifest.
Always work the most urgent event next, and prove you did. Stages: your puzzle, then Keep the top value, Fit the most in, Draw the timeline.
Where it runs today: Support desks, hospital triage and operating system schedulers all work the most urgent item first, and Kubernetes uses pod priority to decide what to schedule and what to evict.
Take it further: Add aging, so low-priority work cannot wait forever, and measure the longest wait before and after.
Grows from: What Falls Off the End, Greedy Action, Longest Zigzag.
Several event streams arriving at once, combined into one ordered stream. Stages: your puzzle, then Rank the events, Merge the event streams, Write the CSV.
Where it runs today: Search engines merge sorted result lists, databases merge sorted runs on disk, and log aggregators merge time-ordered streams from many machines into one.
Take it further: Merge k streams with a heap, and keep the output correct when one stream runs a few seconds behind the others.
Grows from: Kth Smallest.
Overlapping spans are one span. Double counting them is a bug in the bill. Stages: your puzzle, then Merge overlapping spans, Fit the most in, Draw the timeline.
Where it runs today: Calendar apps merge overlapping busy blocks to find free time, and cloud billing merges overlapping usage periods so nobody is charged twice for the same hour.
Take it further: Find the earliest slot when several people are all free, across time zones, which is what scheduling assistants do.
Grows from: Old Is Not the Same as Unused, Max Campaigns in Budget, Schedule Conflict.
Fit the most events into the day. The greedy rule here is provably best. Stages: your puzzle, then Fit the most in, Merge overlapping spans, Draw the timeline.
Where it runs today: Meeting room booking, ad slot scheduling and batch job schedulers fit the most non-overlapping work into a fixed window.
Take it further: Give each slot a value and maximize total value instead of count. The greedy rule stops working, and weighted interval scheduling needs dynamic programming.
Grows from: Fewest Towers on the Lane, Making Change, How Many Rooms?.
What is covered, what is not, and where the gaps are. Stages: your puzzle, then Split into sessions, Merge overlapping spans, Draw the timeline.
Where it runs today: Video platforms track which parts of a video were actually watched, and uptime monitors report covered time. In both, the gaps are what people act on.
Take it further: Compute coverage over a rolling thirty-day window and update it as each new interval arrives instead of recomputing from scratch.
Grows from: Vary It, But Do Not Break It, Merge Intervals, Context Window Budget.
Spend the budget on the events that return the most. Stages: your puzzle, then Fit the budget, Split the events in two, Write the digest.
Where it runs today: Marketing teams split ad budgets across campaigns, cloud teams decide which workloads get reserved capacity, and grant committees fund projects by expected return.
Take it further: Account for uncertainty: give each item a range of returns instead of one number, and allocate to protect the worst case.
Grows from: Best Time to Buy & Sell Stock, Coin Change (Fewest), Minimum Path Sum.
The best run of value anywhere in the event stream, in one pass. Stages: your puzzle, then Best run of value, Peak over a window, Draw the chart.
Where it runs today: Fitness and language apps celebrate streaks, and traders look for the best run of returns in a price history, which is the maximum subarray problem.
Take it further: Find the best streak in a live stream as each value arrives, and the best streak that lasts at least k days.
Grows from: Maximum Subarray, Hamming Distance, Matter Total Fee.
What fits, what it is worth, and what you have to leave behind. Stages: your puzzle, then Fit the budget, Rank the events, Write the CSV.
Where it runs today: Cloud cost tools pack workloads onto machines, shipping companies load trucks by weight and value, and sprint planning is a knapsack with story points.
Take it further: Compare the exact dynamic programming answer with a greedy value-per-cost approximation, and measure how far apart they land on real data.
Grows from: Climbing Stairs, Take the Least Damage, Fewest Top-Ups.
How far apart two events are, measured in edits rather than guessed at. Stages: your puzzle, then Match near-duplicates, Rank the events, Render the report.
Where it runs today: git diff, spell checkers and DNA sequence alignment all measure distance in edits, and code review tools use the same distances to show what changed.
Take it further: Show the edits themselves, not just how many, by tracing back through the table. That is how a diff tool prints its plus and minus lines.
Grows from: Word Break.
Smooth the history, fit the trend, and say where the value is heading. Stages: your puzzle, then Smooth the value, Project the value forward, Draw the chart.
Where it runs today: Retailers forecast demand, cloud teams forecast capacity and finance teams forecast revenue, and most of them start with exactly this: smooth the history, fit a trend, extend it.
Take it further: Hold back the last few weeks of data, forecast them, and measure the error. Then compare against a seasonal model that knows weekends look different.
Grows from: How Much Does It Count?, As Even As It Gets, Pascal's Triangle Row.
Enumerate every combination, then keep only the ones that fit. Stages: your puzzle, then Enumerate the options, Fit the budget, Decide whether to shout.
Where it runs today: CI test matrices run every combination of operating system and version, and cloud tools search instance configurations for the cheapest one that meets a constraint.
Take it further: Use pairwise testing to cover every pair of settings with far fewer runs than every combination, and measure how many runs it saves.
Grows from: 0/1 Knapsack, Longest Increasing Subsequence, Spend the Mana.
Every possible bundle of events, priced and ranked. Stages: your puzzle, then Enumerate the options, Rank the events, Lay out the table.
Where it runs today: Online stores build product bundles, travel sites price flight and hotel packages, and restaurants build combo meals, all by enumerating combinations and ranking them.
Take it further: Add branch and bound so the search skips any bundle that cannot beat the best one already found, and measure how much of the search it prunes.
Grows from: Fewest Jumps to the Flag, Decode the Message.
A dozen yes/no facts per event, in one integer instead of a dozen fields. Stages: your puzzle, then Pack the flags, Split the events in two, Lay out the table.
Where it runs today: Operating systems store file permissions as bits, databases use bitmap indexes to filter millions of rows quickly, and feature flag systems pack many on or off settings per user.
Take it further: Build a bitmap index over a million rows and compare filter speed against scanning the records one by one.
Grows from: Single Number, Binary to Decimal, Decimal to Binary.
Who may do what, checked with a single AND. Stages: your puzzle, then Pack the flags, Index the events, Write the digest.
Where it runs today: Unix file modes such as 755 are permission bits, and quarterly access reviews in companies are exactly this report: who can do what, signed off by someone accountable.
Take it further: Add roles that grant groups of bits, then flag users who hold more access than any role they belong to.
Grows from: Count Set Bits, Modular Exponentiation, Who Is Allowed to Touch?.
Raw event stream in, structured events out, bad lines survived rather than crashed on. Stages: your puzzle, then Parse the event stream, Reject the bad events, Write the CSV.
Where it runs today: Every observability stack starts here: tools such as Fluent Bit, Logstash and Vector parse raw log lines into structured fields and set bad lines aside instead of crashing on them.
Take it further: Parse a real format such as the Apache access log, and measure lines per second before and after replacing the regular expressions with a hand-written scanner.
Grows from: Total Revenue, Lock On, Last Stone Standing.
The stored event stream is mostly repetition. This is the cheapest win on it. Stages: your puzzle, then Compress the run, Checksum the event stream, Decide whether to shout.
Where it runs today: Fax machines, the BMP and TIFF image formats and columnar formats such as Parquet use run-length encoding, and file systems such as ZFS checksum every block so silent corruption is caught on read.
Take it further: Compare your run-length output with a general compressor such as gzip on several kinds of data, and find where each one wins.
Grows from: Hex to Decimal, Tokenize Text.
Type three letters, get the right event. Built from the ground up. Stages: your puzzle, then Suggest as they type, Index the events, Write the digest.
Where it runs today: Elasticsearch, Lucene and most site search boxes are built on an inverted index: a posting list per term that points at the documents containing it.
Take it further: Add relevance ranking with BM25, then compare keyword search with embedding-based vector search on the same documents, the hybrid that modern retrieval systems use.
Grows from: The Same Thing Twice, Count Vowels, Read the Root.
Have we seen this event? Answered in one integer's worth of memory. Stages: your puzzle, then Pack the flags, Find what changed, Render the report.
Where it runs today: Bloom filters answer have we seen this before in very little memory. Databases such as Cassandra use them to skip disk reads, and early versions of Chrome's Safe Browsing used one to check URLs.
Take it further: Build a real Bloom filter with several hash functions, and measure its false positive rate against the formula.
Grows from: Tiles That Know Their Neighbors, Read One Bit, Count Trailing Zeros.
Old events get compressed, not deleted, and stay searchable. Stages: your puzzle, then Compress the run, Index the events, Write the digest.
Where it runs today: Cloud storage moves old data to cheaper tiers such as Amazon S3 Glacier, and log platforms compress old logs while keeping an index so they can still be searched.
Take it further: Measure the trade: how much storage compression saves against how much slower a search over archived data becomes.
Grows from: Run-Length Encoding, Longest Common Prefix, Model Accuracy.
Order the events by value, stably, so two runs agree. Stages: your puzzle, then Rank the events, Page the results, Lay out the table.
Where it runs today: Every list you scroll is ranked and paged: search results, product listings, social feeds. A stable sort is what stops items jumping between pages when you refresh.
Take it further: Rank by a blend of signals such as price, rating and recency, and test that the order stays stable when two items tie.
Grows from: Min-Max Scaling, k-Nearest Neighbors, Leaky ReLU.
The top events of the day, as a message somebody would actually read. Stages: your puzzle, then Rank the events, Index the events, Write the digest.
Where it runs today: Daily digest emails from news sites, forums and team tools pick the top items, group them by topic and format them for someone skimming on a phone.
Take it further: Personalize it: rank items differently for each reader based on what they opened last time, and measure whether the digest gets opened more.
Grows from: Median of a Window, Heap After Pops.
Totals between any two points, answered instantly, asked constantly. Stages: your puzzle, then Answer range queries, Peak over a window, Draw the timeline.
Where it runs today: Analytics databases precompute running totals so a question like revenue between two dates answers instantly, and time-series databases use the same trick for range queries.
Take it further: Support updates as well as queries with a Fenwick tree or a segment tree, so one corrected value does not mean rebuilding every prefix.
Grows from: Plus One, Funnel Drop-off, Count Defects.
The numbers behind the dashboard, computed once and reused. Stages: your puzzle, then Smooth the value, Bucket the value, Render the report.
Where it runs today: Dashboards are fed by rollup jobs that compute summaries once, on a schedule, so a page load reads a handful of numbers instead of scanning raw events.
Take it further: Make the rollup incremental, updating each summary as events arrive instead of recomputing the whole day.
Grows from: How Much Did We Learn?, Count Overdue Cases, Digit Sum.
Smooth it, then flag the stretches that do not belong. Stages: your puzzle, then Smooth the value, Flag the outliers, Decide whether to shout.
Where it runs today: Cloud monitoring, card fraud detection and factory sensors all smooth a signal first and then flag the points that sit too far from it.
Take it further: Compare a fixed threshold with a seasonal baseline, and measure false alarms on data that has a daily cycle.
Grows from: Best Campaign, Sliding Window Maximum, A/B Test Winner.
Every event that arrived, in order, with the totals to prove it. Stages: your puzzle, then Parse the event stream, Tally by key, Render the report.
Where it runs today: Banks, healthcare systems and cloud providers keep append-only audit logs (AWS CloudTrail records API calls this way), and the totals are how an auditor shows nothing was dropped.
Take it further: Make the trail tamper-evident by chaining a hash of each entry into the next, the same idea that makes certificate transparency logs hard to rewrite.
Grows from: Peak Load, Within Tolerance?, Days Remaining.
The unglamorous half: get the event stream in, cleanly, every time. Stages: your puzzle, then Parse the event stream, Drop the repeats, Lay out the table.
Where it runs today: A data team's first pipeline is almost always intake: pulling files or events in, parsing them, and dropping duplicates before they reach the warehouse.
Take it further: Make intake idempotent so re-running yesterday's import changes nothing, then add a report of what was rejected and why.
Grows from: Two Sum, First Unique Character, Average Reading.
Two sides that must agree, and a report naming the ones that do not. Stages: your puzzle, then Find the matching pair, Keep a running total, Summarise in a sentence.
Where it runs today: Double-entry bookkeeping, in use for over five hundred years, requires every debit to have a matching credit, and a running balance is how a bookkeeper finds where the books stopped agreeing.
Take it further: Find the first point where the books stopped balancing with a binary search over the running balance.
Grows from: Factorial, Does the Ruling Pass?, Linear Search.
How many events an hour, and when it fell off a cliff. Stages: your puzzle, then Tally by key, Flag the outliers, Bucket it into a histogram.
Where it runs today: Operations teams track requests per minute, orders per hour or builds per day, and a sudden drop in throughput is often the first sign of an outage.
Take it further: Detect the drop automatically by comparing each hour with the same hour last week, so normal overnight dips do not page anyone.
Grows from: Power of Two?, Apply Discount, Billable Rounding.
Who came back, who did not, and how long it took to tell. Stages: your puzzle, then Split into sessions, Find what changed, Draw the timeline.
Where it runs today: Subscription apps track retention: of the people who arrived this week, how many came back the next. It is often the first number investors ask about.
Take it further: Build a cohort table with one row per signup week, and check whether a product change improved retention for new users only.
Grows from: A Name Becomes a Number, Conversion Rate, Repeat Customers.
Prove the event stream arrived intact, cheaply enough to do every time. Stages: your puzzle, then Checksum the event stream, Keep a running total, Decide whether to shout.
Where it runs today: TCP segments, zip files, Git objects and cloud storage uploads all carry a checksum or hash so corruption is caught instead of silently trusted.
Take it further: Compare CRC-32 with a cryptographic hash such as SHA-256: which catches random corruption, which catches deliberate tampering, and what each one costs.
Grows from: What Are the Odds?, The Next Number, Is It Prime?.
Raw value is not the real value. This corrects it. Stages: your puzzle, then Put it on one scale, Rank the events, Write the CSV.
Where it runs today: Sensors in phones, cars and labs are calibrated against known references, and machine learning models are calibrated so that a predicted 70 percent happens about 70 percent of the time.
Take it further: Fit the correction from pairs of raw and reference readings with least squares, instead of rescaling by hand.
Grows from: Greatest Common Divisor, Nth Fibonacci, Selection Sort.
You cannot keep all of it. Keep a slice that still tells the truth. Stages: your puzzle, then Page the results, Bucket the value, Bucket it into a histogram.
Where it runs today: Distributed tracing tools keep a sample of requests, pollsters sample voters, and analytics tools sample huge tables, all under one rule: the sample has to look like the whole.
Take it further: Implement reservoir sampling to keep a fair sample of a stream whose length you do not know in advance.
Grows from: Legal Fee, Reverse Integer, Cart Total with Tax.
Totals per key, over a period, that somebody will be invoiced from. Stages: your puzzle, then Answer range queries, Keep a running total, Write the CSV.
Where it runs today: Cloud providers bill by usage between two dates, so every invoice is a range query over metered events plus a running balance.
Take it further: Handle a mid-month plan change by splitting the range and prorating each part.
Grows from: Product of Array Except Self, Unanimous Verdict?, Best Month Profit.
Project the value forward from what the event stream has already done. Stages: your puzzle, then Smooth the value, Project the value forward, Summarise in a sentence.
Where it runs today: Startups project user and revenue growth from history, and capacity planners project when a database will run out of disk.
Take it further: Fit an exponential curve as well as a straight line, and show which fits the history better and how far apart their projections drift.
Grows from: Halfway Between, Running Sum, Pascal's Triangle.
Projects that solve a real problem, run end to end, have tests, and let you explain a trade-off you made. A rate limiter, a cache with an eviction policy, a search index or a log parser all qualify, because each one is a small version of a system companies run in production and each has an obvious next step to measure.
No. You can open a project from any puzzle at any time. If the puzzle is not solved yet, its stage is marked as still to do, and you can write the other stages first and come back to it.
JavaScript, Python and C++. The project follows the language you are solving the puzzle in, and the download is built in that language.
A folder with a source file for each stage, a pipeline that connects the stages, a test suite, sample data and a README that explains the architecture and what to try next. JavaScript and Python projects run with no install step, and C++ projects come with a Makefile.
Every free account includes one whole project, on whichever puzzle you pick. Premium unlocks a project on every puzzle. Anyone can open the catalog and preview the project any puzzle grows into.
Learn the patterns in the DSA bootcamp, practice the interview, or browse all 576 practice puzzles.