huffman-coding
2 free lessons tagged huffman-coding across Computer Science. Each one is a short sequence of focused steps with narration and a five-question quiz at the end — take them in any order, no signup required.
Greedy: Proving a Local Choice Is Globally Right
A greedy algorithm is three lines of code and a proof. This lesson covers the proof techniques that make it an algorithm rather than a heuristic: the exchange argument, greedy-stays-ahead, Huffman's merge, and the matroid theorem that says exactly when greedy is guaranteed.
Source Coding: Huffman, Arithmetic Coding and ANS
Entropy is a hard floor on lossless compression, and this lesson shows how coders approach it. Build a Huffman tree by hand, see exactly where it wastes bits on skewed sources, then follow the fix through arithmetic coding to asymmetric numeral systems, the entropy stage inside Zstandard.

