visual-cs

Algorithm Visualizations

← All Visualizations

Huffman Coding

An optimal prefix-free compression algorithm that assigns shorter bit strings to more frequent symbols. Build the Huffman tree step-by-step, inspect codes, and see live compression statistics.

Priority Queue (min-heap) — Step 0
Press Build to start
CharFreqCodeBitsContribution
Encoded bits will appear here…