
Radix Sort: Sort a Million Integers Without a Single Comparison
Radix sort algorithm: sort fixed-width integers in O(d(n+k)) with no comparisons. LSD mechanics, stability proof, base 256 tradeoff, and 14 implementations.
Page 47 of 61 · Ideas for curious minds in tech.
Back to the archive
Radix sort algorithm: sort fixed-width integers in O(d(n+k)) with no comparisons. LSD mechanics, stability proof, base 256 tradeoff, and 14 implementations.

Heap sort time complexity explained: why build-heap runs in O(n), not O(n log n). The geometric proof, 14 implementations, and when to use it.

The quickselect algorithm finds the kth smallest element in O(n) expected time. Partition once, discard the wrong half, done.

Counting sort algorithm runs in O(n+k) without comparing a single element. Three-phase walkthrough, stability proof, and 14 language implementations.

Prim's algorithm builds the minimum spanning tree one cheap edge at a time. Cut property proof, time complexity breakdown, and 14 language implementations.

A* search algorithm explained: f=g+h, admissible heuristics, consistency proof, O(E log V) complexity, and 14 implementations in every language.

An interval tree augments a BST with one max_high field to answer overlap queries in O(log n). Full guide with correctness proofs and 14 implementations.

Learn how the k-d tree works: O(n log n) build, O(log n) nearest neighbor search, range queries, and implementations in 14 languages.

Master the Bellman-Ford algorithm: handle negative edge weights, detect negative cycles, and solve cheapest flights with K stops in O(VE).

Learn how the order-statistics tree adds one integer per node to answer rank queries and k-th smallest in O(log n), with 14 language implementations.

Kruskal's algorithm builds a minimum spanning tree in O(E log E) using Union-Find. Cut property proof, complexity analysis, and 14 implementations.

The Floyd-Warshall algorithm finds all-pairs shortest paths in O(V³). DP state, recurrence, loop order, negative cycles, and 14 language implementations.

How the suffix tree data structure works: Ukkonen's O(n) construction, O(|P|) search, longest repeated substring, and 14 language implementations.

Suffix array explained: prefix doubling, Kasai's LCP algorithm, and 14 language implementations for pattern search, BWT, and string compression.

A sparse table answers range minimum queries in O(1) using two overlapping lookups. O(n log n) preprocessing, 14 language implementations.

Learn how the Bloom filter works, derive its false positive rate formula, and implement it in 14 languages. O(1) lookup using just 9.6 bits per element.

The treap data structure uses random priorities to keep a BST balanced in O(log n). Split, merge, implicit treap, and 14 language implementations.

Skip list data structure explained with O(log n) proof, search/insert/delete operations, and complete implementations in 14 languages.

B-tree and B+ tree explained: how disk-page-sized nodes collapse a billion-key tree to 3 levels, with proactive splitting and 14 language implementations.

Complete guide to the Nvidia staff software engineer interview at IC5. Every round decoded, from CUDA deep-dives to the executive vision round.

Full guide to the Stripe staff software engineer interview at L4: the presentation round, Bug Bash, system design, down-leveling risk, and how to prepare.

Full guide to the OpenAI staff software engineer interview: every round, L5 vs L4 differences, system design tips, and a 6-week prep plan.

What the Uber staff software engineer interview tests at L5B: five rounds, bar raiser veto, system design math, and a six-week prep plan.

Netflix staff software engineer interview guide: L6 loop structure, two system design rounds, behavioral expectations, and a prep plan.