
Code Table
If only one single node is remaining within the table, it forms the root of the Huffman tree. The paths from the root node to the leaf nodes define the code word used for the corresponding symbol:
Symbol Frequency Code Word
a 5 0
b 2 10
r 2 111
c 1 1101
d 1 1100
Complete Huffman Tree:

< ^ >
|