Construct a Huffman tree for a file that contains a single s…
Construct a Huffman tree for a file that contains a single string “abbcccc”. Assume the node with a lower priority is attached to the left of the parent node in case two nodes are merged after extraction from the priority queue; traversing left from a node appends ‘0’ to the Huffman code and traversing right appends ‘1’. What are the Huffman codes for: character ‘a’ : [a] character ‘b’ : [b] character ‘c’ : [c]
Read Details