Wednesday, March 16, 2011

HW #2.6
a rough algorithm for discovering the bit patterns from the Huffman tree:
Algorithm postOrder(v, s)
     if (v is leaf)
arr[v.character] = s;
return;
postOrder (n.left, s+”0”)
postOrder (n.right, s+”1”)


implement that to build an array mapping letters to bit strings

No comments:

Post a Comment