Initial frequencies
Start with each symbol as its own one-node tree.
no merge yet
Build the coding tree by repeatedly merging the two lowest weights. The lower child goes left and gets bit 0; the higher child goes right and gets bit 1.
Start with each symbol as its own one-node tree.