Concept Flow - Huffman Encoding
Count frequency of chars
Build min-heap of nodes
While heap size > 1
Pop two smallest nodes
Create new node with sum freq
Push new node back to heap
Heap has one node -> root
Traverse tree to assign codes
Output codes for each char
Huffman Encoding builds a tree from character frequencies using a min-heap, then assigns binary codes by traversing the tree.
