
356 Data Structures Using C
in the list, we may have many
different Huffman trees. For
instance, in the example given
above in second step if we swap
the values of 3* and 3 and in
third step, swap the values of
6* and 6, we would get a differ-
ent Huffman tree as compared
to the Huffman tree obtained
above (see Figure 7.53). How-
ever, both the Huffman trees
will have the same weighted
path lengths, i.e. 74.
Thus, construction of Huff-
man tree by the Huffman algo-
rithm may not always result in a
unique tree.
As discussed above, the Huffman tree can be usefully applied to data compression techniques for
storing files ...