Concept Flow - Huffman Encoding
Count frequency of each character
Create leaf nodes for each char
Build min-heap from leaf nodes
While heap size > 1
Extract two smallest nodes
Create new internal node with these two as children
Insert new node back into heap
Back to While
Heap has one node: root of Huffman Tree
Traverse tree to assign codes
Output codes for each character
↩Back to While
This flow shows how Huffman Encoding builds a tree from character frequencies, then assigns binary codes by traversing the tree.