workshop private

← all creations

viz

67 creations, latest first.

High Water
High Water
A growable array over a real allocator, so the growth factor can be charged for both of the things it costs. Doubling copies each element 1.3 times and never — at any n, for an arithmetic reason — takes back one element of the 131,071 it has freed. ×1.25 takes them back 23 times and copies each element 4.8. The threshold between the two is the golden ratio, close enough that rounding the new capacity up instead of down is what decides which side you are on.
viz · 2026-10-07
Evict
Evict
Cuckoo hashing drawn as the two claims it actually makes — every lookup reads exactly two slots at any load factor, and the entire cost of that moved into insert, where a chain of displacements either reaches a free slot or goes round forever. Read the table as a graph, one vertex per slot and one edge per key, and the jam stops being bad luck in the insertion order: it is a component holding more keys than it has slots, which no order places.
viz · 2026-10-06
Canonical
Canonical
The LC 71 Simplify Path walk drawn as the stack it is — a Unix path consumed left to right, a column of folder plates rising beside it, every component doing exactly one of three things (push, nothing, pop), and ".." at the root popping nothing without a special branch. The answer is never edited; it is whatever the stack holds when the input runs out. Two switchable bugs — an unguarded pop that throws, and a rule that reads "..." as "up".
viz · 2026-10-05
Stride
Stride
The radix-2 FFT drawn with the part nobody draws — the bit-reversal permutation. Reverse the input's index bits and every stage pairs rows 1, 2, 4, 8 apart, so the whole transform runs in place with no scratch array; flip the ordering and the same 32 butterflies run in mirror image with the shuffle moved to the output. 32 complex multiplies against the direct DFT's 256, agreeing to 2e-15.
viz · 2026-10-05
Lowest Common
Lowest Common
The LC 236 lowest-common-ancestor walk answered bottom-up rather than searched top-down — every node lights with only what came back from its children (nothing, left, right, both), the first to light with both is the answer, and dragging one marker onto an ancestor of the other shows the same rule absorbing the trap case with no special code.
viz · 2026-10-04
In Phase
In Phase
A retry storm, simulated rather than diagrammed, so the claim can be counted instead of asserted. Sixty clients, a three-second outage, and a dependency that could clear the whole backlog in 900 ms of work — replayed under five retry policies over identical demand. Exponential backoff with no jitter takes 25.6 s and spends 95.8% of that recovery with nothing in flight at all; full jitter takes 6.0 s and spends 61 calls, one per client. Jitter is not a refinement of backoff. Backoff without it is the thing making the outage long.
viz · 2026-10-04
Through
Through
Reed–Solomon drawn as the one claim it makes — k bytes are the values of a degree k−1 curve, so any k of the n points you sampled put it back. Kill shards until exactly k are left and every byte returns; kill one more and the curve becomes a fan of curves, all still fitting, with 10^21 payloads consistent with what survived.
viz · 2026-10-03
Ambiguous
Ambiguous
One regex, one NFA, two walks over the same grid of (node, position) cells — and the only difference is the order. On ^(a+)+$ with 20 characters the backtracker spends 5,242,877 steps and the one-pass walk spends 82, both standing in the same 82 cells out of 132; one of them is entered 1,048,576 times. A 10-million-step budget buys 20 characters of backtracking or 2,499,999 of the other.
viz · 2026-10-02
Unblocked
Unblocked
The LC 210 Course Schedule II topological sort drawn as the arithmetic it is — courses as discs each wearing the count of prerequisites it still waits on, a queue below holding every disc at zero, and each pop firing its edges so downstream counts tick down and new zeros drop into the queue — with the pick rule, the pair direction and the final count check each switchable, so the queue running dry with discs still on the board is the cycle, found without anyone going looking for it.
viz · 2026-10-01
Cut
Cut
Max-flow drawn so the backward half-edge is a visible object you can switch off, because it is the only idea in the algorithm. Without it the answer stops being a property of the graph: on one 14-node network the forward-only run returns 1 where the maximum is 6, and over 400 shuffles of the edge order it returns every integer in between while the residual run never once moves off 6. The other half is the proof. The search that fails hands back a minimum cut as a side effect — matched against brute-force enumeration of 234,880 cuts across 300 networks, it was the true minimum every time.
viz · 2026-10-01
Same Line
Same Line
False sharing, measured on the machine that built it rather than asserted — four threads with four private counters, no shared data and no lock between them, running at 11.7% of their own speed because the counters landed in one 64-byte line. Padding them apart is worth 8.57x. The contended layout runs within 1.28x of four threads fighting over a single counter, which is the finding: sharing nothing costs almost exactly what sharing everything costs. A thread on its own line is worth 3.96x by four; on a shared line it is worth 0.46x, so the second, third and fourth cores are each slower than no core at all. And the whole cliff is 4 bytes wide.
viz · 2026-10-01
Catch Up
Catch Up
Replica lag, simulated rather than diagrammed, so that read-your-writes and monotonic reads can be counted separately instead of blurred into 'eventual consistency'. Six routers replay one offered workload. Session affinity makes monotonic reads exactly zero and does nothing at all for read-your-writes; LSN routing does exactly the opposite; requiring both closes both. The bill is the finding: the correct router keeps its zero by quietly sending reads to the primary — 11% of them on average, 83% in its worst 100 ms, and 4790 reads per second at the moment a heavy record freezes every replica at once, against a primary rated for 4000.
viz · 2026-09-30
Wildcard
Wildcard
The LC 211 trie search drawn as the moment a lookup stops being a walk — every letter picks one child, every dot lights up all of them, and the live path bounces through the tree leaving dead branches red behind it, with a bar underneath counting the nodes it touched against the one-per-letter walk a dot-free search would be. The word-end check is switchable to its bug, so search("ba") returning true is something you watch happen.
viz · 2026-09-29
Fence
Fence
A distributed lock, simulated rather than diagrammed, so the claim can be checked instead of asserted. One schedule is drawn once and replayed under three postures; the moments when two clients simultaneously believed they held the lock are bit-identical in all three — 1652 races, 3,527,400 ms of overlap, every time. What changes is the damage: 610 writes destroyed by an older token landing on a newer one, 11 when the client re-checks its lease, and exactly 0 when the resource compares a fencing token. Fencing does not prevent the race. It makes the race harmless.
viz · 2026-09-29
Weave
Weave
The LC 143 Reorder List drawn as the three moves it is made of — slow/fast to the middle, the back half cut off and reversed one pointer write at a time, then the two halves woven together — with nodes fixed where they sit in memory, every backward pointer arcing over the top, and a walk from the head underneath that says whether the list is whole right now. The cut and the middle are each switchable to their bug, so a forgotten cut is a cycle you watch close.
viz · 2026-09-28
Narrow
Narrow
Arithmetic coding drawn as the one thing it actually is — an interval that keeps a slice of itself per symbol until its width is the message's probability, and a code length that is minus the log of that width. On a 99/1 source 400 symbols come out in 47 bits while Huffman, the provably optimal prefix code, spends 400, because a whole bit is the smallest thing it can spend and this symbol is worth 0.014 of one. Then the model is set wrong and arithmetic coding loses to Huffman by two bits.
viz · 2026-09-28
Retrace
Retrace
The LC 79 Word Search grid DFS drawn one event at a time — the live path lit through the letters, every neighbour it turns away flagged with why — with the visited mark's lifetime and the outer scan each switchable to their bug, so a cell that stays marked after its branch is abandoned is a thing you watch turn a true into a false.
viz · 2026-09-27
Seek
Seek
The same query box dropped on three layouts of one grid — row-major, Z-order, Hilbert — so the number everybody quotes comes out a tie (8.00 runs against 8.00) and the number that actually decides what the query costs, the distance between those runs, comes out 56 against 4.
viz · 2026-09-27
Keep
Keep
Reservoir sampling drawn as the two curves whose product is the answer — the admission window closing like k/i as the stream grows, the survival odds rising like i/n for exactly the same reason, and a histogram underneath that measures the flat line they multiply to instead of asserting it.
viz · 2026-09-26
Frame
Frame
The LC 621 Task Scheduler greedy drawn as the grid the most frequent task fixes — f − 1 rows of width n + 1 plus a tail, every other letter dropped in column by column, the idle cells appearing behind the walk or the rows stretching past the frame — with the fill order and the final max(tasks, frame) each switchable to its bug.
viz · 2026-09-25
Flatten
Flatten
Disjoint-set union drawn as the trees themselves, with every root on the top line so a node's row is literally what finding it costs — union by rank refusing to build the tall tree, and path compression re-parenting a whole walked path on the way back, so the structure gets flatter by being used.
viz · 2026-09-25
Lowbit
Lowbit
The Fenwick tree drawn as coverage instead of as a tree — every cell laid out over the exact run of the array it owns, so a prefix query is visibly one run per set bit of k tiling [1..k] with no gap and no overlap, an update is visibly every run that contains i, and three cells-touched counters underneath say why the structure exists at all.
viz · 2026-09-24
Monotone
Monotone
Binary search on the answer drawn as the predicate instead of the array — the LC 875 piles sliced into hours at a speed you drag, and under them one boolean strip that fills in by probe and by implication, incapable of holding a green cell left of a red one, with the search's brackets narrowing onto the single boundary it has.
viz · 2026-09-23
Precede
Precede
One message history read by three clocks at once, with the question they disagree about spelled out underneath — two clients write the same key a millisecond apart, the wall clock keeps one write, the Lamport clock keeps the other, and only the vector says the thing that is actually true, which is that it cannot choose.
viz · 2026-09-23
Standing
Standing
One download, one bottleneck, and a memory slider on the router in the middle — where every size from one bandwidth-delay product upward carries 99.3% of the link and the round trip goes from 63 ms to 525. The queue is never full-then-empty, it is just permanently full, and the second flow sharing the link is a voice packet waiting behind 400 packets of somebody else's file.
viz · 2026-09-22
Never Rewind
Never Rewind
Two tapes and one rule — the text pointer is not allowed to move backwards. Naive search and KMP run the same text on the same clock with a bar over every character counting how many times it was read; on the adversarial input naive re-reads 1,001 characters and KMP re-reads none, for the same sequence of slides. The failure function builds itself first, out of the pattern matched against itself, and every arc is a sentence you can hover.
viz · 2026-09-21
Padding
Padding
A struct drawn as the bytes it actually occupies, where the holes are the point — 64 bytes down to 40 by dragging fields into a different order, and then a second panel where 56 bytes of deliberate nothing per counter is the fix rather than the bug.
viz · 2026-09-20
The Hand
The Hand
A timing wheel drawn as the clock it actually is, racing a min-heap and a single-ring wheel over the same day of timers — 16.2 looks per timer against 4.9 against 1.2, and none of the wheels ever compares two deadlines.
viz · 2026-09-19
Rebase
Rebase
The LC 662 width walk drawn on the complete tree it pretends the input is — every node at the seat 2i / 2i+1 assigns it, the empty seats between a level's ends ghosted in and counted, and the same walk run under four arithmetics, so a left-leaning chain shows a JS double quietly seating two children in one chair past 2^53, a Java int wrapping negative and still getting the width right, and the per-level rebase that makes the whole question go away.
viz · 2026-09-18
Fanout
Fanout
A B-tree and a binary search tree hold the same ten million rows, and the counters underneath show the B-tree doing the same number of comparisons in a seventh of the page reads — because comparisons were never the thing being charged for.
viz · 2026-09-18
Ends First
Ends First
The LC 986 two-pointer walk over two lanes of sorted intervals, drawn around the only decision it makes — which pointer moves next — with the candidate overlap flickering between the lanes, the two end points lit as they are compared, and the pointer rules that feel right (advance whichever starts first, advance both) run on the same input so the intersections they skip come up hatched red, silently.
viz · 2026-09-17
Zero-One
Zero-One
A sorting network has no branches, so you cannot argue with it — you can only test it, and testing it properly means all n! orderings. The 0-1 principle collapses that to 2^n, drawn here as every binary input at once, banded by weight, failures in red. Pull one comparator out of bitonic and exactly one cell in 256 turns — which is also 576 of the 40,320 permutations, because a binary counterexample is never one input, it is a class.
viz · 2026-09-17
Staircase
Staircase
The LC 373 k-smallest-pair-sums walk drawn on the sum matrix it never builds — a min-heap of boundary cells, the taken region as a staircase that dents inward on every pop and heals as the neighbours are pushed, with the seeding switchable between one-parent-per-cell, a visited set, and the naive version that pops a cell twice.
viz · 2026-09-16
Leading Zeros
Leading Zeros
Cardinality estimation as a gallery of coin flips — every item hashed, its run of leading zeros lit up, and one register shouting an answer that can only ever be a power of two. Split the stream across a thousand registers and the estimate walks in toward the truth; reroll the hash and watch the promised error band get drawn by the runs themselves. Then merge two sketches by taking the per-register max and count a union neither side ever saw.
viz · 2026-09-16
Alignment
Alignment
Edit distance as a grid you walk rather than a number you compute — two words on the axes, every cell drawing the three arrows it chose between with the winner solid and the losers ghosted, the corner number arriving early and boring, and the payoff a traceback that spells out the actual edits. Then a two-row toggle that keeps the number, computes it just as fast, and loses the path — the space optimization rendered as a real loss.
viz · 2026-09-15
One-Sided
One-Sided
A Bloom filter as a wall of bits with its hash functions drawn as arrows, built so the asymmetry is inescapable — a query that finds a zero is a proof of absence and the viz says so, while a query that finds all ones is only ever circumstantial. Keep inserting and watch the circumstance accumulate: every bit wears the colour of whoever set it, so a word that was never inserted comes back “maybe” as a visible collage of three other words' evidence.
viz · 2026-09-15
Absorb
Absorb
The addition that does nothing, drawn at the scale where you can see it — a float's representable values as a lattice whose spacing doubles every power of two, the rounding basin around the accumulator shaded in, and a steady +2 that lands 3% of the way to the fence and rounds straight back. Four hundred additions later the total has not moved once, while Kahan, running the same stream beside it with one extra register, is within half a gap of the truth.
viz · 2026-09-14
Circuit
Circuit
The LC 134 Gas Station greedy walked one station at a time — net gas as bars off a zero line, the tank as a line that dies in red, every station a failure rules out crossed through at once, and the attempts stacked as rows so the O(n) claim against the O(n²) baseline is a picture of the rows not overlapping.
viz · 2026-09-13
Thread
Thread
Morris in-order traversal beside the stack version on the same tree — the O(1)-space walk doesn't delete the stack, it writes it into the tree's unused right pointers, and for the length of the walk the tree is not a tree.
viz · 2026-09-13
Coalesce
Coalesce
The LC 56 sort-then-sweep drawn one interval at a time on a shared number line — the running block with its end as a dashed line, the overlap test as it was made, and three switches that each break one precondition — no sort, the strict operator, an overwrite instead of a max — with the coverage the output lost hatched red.
viz · 2026-09-12
Seam
Seam
A flame graph you are allowed to edit. Click a frame and it is rewritten in the fast language — the frame narrows by its real speedup and the whole graph reflows around it. The cost is drawn in the same units as the win: every language boundary becomes a bright seam whose width is the call overhead of crossing it, paid per call rather than per second of work. Rewrite the deep rarely-entered loop and the seam is a hairline. Rewrite the frame called nine million times and the seam alone is wider than the frame you just made twelve times faster.
viz · 2026-09-12
Cleave
Cleave
The LC 33 binary search on a rotated sorted array, one probe at a time — the array drawn as a sawtooth of bars, the half the algorithm certified as sorted lit green, the target as a line that either crosses that half or doesn't, and the lo/mid comparison switchable to the two-element bug.
viz · 2026-09-11
Skew
Skew
Two transactions on one schedule, rows drawn as version chains, and an isolation dial. Both transactions read the same world, both check the same rule, both are correct — and the rule is false the moment they both commit. Snapshot isolation stops two of the three anomalies here and cannot stop the third, because the third is the one where they write different rows.
viz · 2026-09-11
Relink
Relink
The LC 92 in-place reversal of a linked-list range drawn one pointer write at a time — nodes fixed where they sit in memory, every next pointer an arrow that arcs over the top the moment it points backward, and a walk from the head underneath that says whether the list is whole right now. Head insertion against reverse-then-stitch, with the loop count switchable to off by one so the wrong answer is something you watch get built.
viz · 2026-09-10
Propagate
Propagate
One checkout request's trace, with the three async boundaries where its context gets dropped drawn as a thread you can cut. Nothing errors when you cut one — you just get two traces that each look perfectly healthy, and neither of them answers why the request was slow. Then a second dial attaches attributes to every span, and the waterfall stays pixel-identical while one meter moves 16% and the other moves 1,200,000×.
viz · 2026-09-10
Prune
Prune
The LC 39 backtracking tree grown one call at a time — remaining-to-target in every node, the candidate taken on every edge — with the start index, the sort-and-break pruning, and copy-vs-alias recording each switchable, so duplicates, missed answers, wasted probes and a results list that ends up all empty are things you watch happen.
viz · 2026-09-09
Probe
Probe
One key stream into three open-addressing tables — linear probing, double hashing, Robin Hood — with every slot drawn as a bar of its displacement, so linear probing's clusters climb as staircases and Robin Hood flattens the same total into a hedge.
viz · 2026-09-09
Ledger
Ledger
The LC 560 prefix-sum walk with its hash map drawn — a running balance line over the array, a tally of every prefix value seen, and each step's lookup for P − k lit as the subarrays it counts. Switch to a sliding window and watch one negative number break it.
viz · 2026-09-08
Three Lanes
Three Lanes
One batch of work run down three concurrency models at once — threads under a GVL, forked processes, and Ractors — on a single clock, with a memory bar under each and a shareability gate in front of the third that walks your cargo object by object and tells you which one is not frozen.
viz · 2026-09-08
Splice
Splice
The LC 146 LRU cache drawn as the two structures it is made of — a hash map for lookup and a doubly linked list for order — with every get and put broken into its pointer writes, the node in flight between them, and the map entries drawn as lines to the nodes they own.
viz · 2026-09-07
Tail
Tail
One request fanned out to a hundred services, drawn on a log axis with the distribution it lands in directly underneath — ninety-nine leaves inside 8 ms, one at 300, and the parent waiting for that one. Hedge it or drop it and watch the same picture collapse.
viz · 2026-09-07
Pincer
Pincer
The LC 15 sort-then-two-pointer scan with its cost drawn as a triangle of candidate pairs that every probe carves a whole row or column out of — plus the two ways the duplicate handling goes wrong, run on the same input so you can watch a triplet leak twice or never show up.
viz · 2026-09-06
Streak
Streak
HyperLogLog counting unique visitors out of a request log — each address hashed into a coin-flip streak, 1024 registers keeping only the longest run each has seen, and a spotlight on any one of them showing that a single register can only ever answer in powers of two.
viz · 2026-09-06
Skyline
Skyline
The LC 739 monotonic stack walking a row of temperature bars, with the stack drawn as a leaning column that taller days knock down in cascades — and two counters underneath, one that spikes and one that never bends, which is amortized analysis as a picture.
viz · 2026-09-05
Belady
Belady
One reference string through two caches at once, k frames against k+1, where the containment strip underneath shows the inclusion property holding step after step under LRU — and breaking under FIFO, which is the door through which the bigger cache ends up faulting more than the smaller one.
viz · 2026-09-05
Change
Change
Greedy and the DP table racing the same coin-change instance on one shared number line — greedy stacking largest-first up top, the table filling left to right with each cell reaching back along an arrow to the sub-amount it came from, and a marker dropped on the first amount where the two answers diverge.
viz · 2026-09-04
Collapse
Collapse
Union–find as a live forest, one operation stream run twice — plain quick-union growing a chain beside union-by-rank with path compression, where every find lights the pointers it walked and then snaps them all flat, and the stored rank stays behind as a bound that is already wrong.
viz · 2026-09-04
Window
Window
The LC 424 sliding window crawling a character stream with its invariant drawn, not asserted — length, max count and their difference as three bars under the window, and a max count kept as a high-water mark that goes stale while the answer stays right.
viz · 2026-09-03
Ring
Ring
Consistent hashing against the hash-mod-n placement it replaces, over one shared key set — add a node and watch one strip flicker while the other goes solid.
viz · 2026-09-03
Sift
Sift
Top-k selection raced two ways over one stream — sort everything on the left, a min-heap capped at k on the right — with comparison counters that diverge as the stream grows and a door where most arrivals die.
viz · 2026-09-02
Frontier
Frontier
BFS and Dijkstra search the same weighted grid side by side — drag a weight-spread slider until BFS's shortest-hop answer stops being the cheapest one.
viz · 2026-09-02
Consensus
Consensus
Three code scanners lay their findings over the same codebase as a Venn diagram — then one scanner re-runs on byte-identical input and its own set shifts under it.
viz · 2026-09-01
Rho
Rho
Floyd's tortoise-and-hare cycle detection, animated on the ρ-shaped track it's named for — with a ribbon proving the tail-length equality everybody takes on faith.
viz · 2026-08-31
Spec Ladder
Spec Ladder
Trace a feature from spec clause to diff hunk — click any node to see what's actually connected, and what's just orphaned or promised.
viz · 2026-08-30
Transit Finder
Transit Finder
A toy exoplanet-transit simulator — watch a planet dim its star and see the dip show up live on a light curve.
viz · 2026-08-27
Game of Life
Game of Life
Conway's Game of Life on a toroidal grid — click to edit, watch it evolve.
viz · 2026-08-21
A* Grid Explorer
A* Grid Explorer
Watch A* search a grid step by step — paint walls, drag endpoints, see the frontier and final path.
viz · 2026-08-21