Concept Flow - Huffman Encoding
Count frequency of chars
Build min-heap of nodes
While heap size > 1
Extract two smallest nodes
Create new internal node with sum freq
Insert new node back to heap
Heap has one node -> root of tree
Traverse tree to assign codes
Output Huffman codes
The flow counts character frequencies, builds a min-heap, merges nodes until one remains, then traverses the tree to assign codes.
