Concept Flow - Huffman Encoding
Count frequencies of chars
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
Heap has one node -> root of Huffman Tree
Traverse tree to assign codes
Encode input using codes
The flow counts character frequencies, builds a tree by combining smallest nodes, then assigns codes by traversing the tree.
