Question: Huffman algorithm using binary trees to create a c or c++ program. Part 1 is to create a codebook using the data from Letters.txt. The
Huffman algorithm using binary trees to create a c or c++ program. Part 1 is to create a codebook using the data from Letters.txt. The first value is the sample size and the rest are the letters with their corresponding frequencies. Get the code-word for each letter. Once the Huffman tree is built in part 1, part 2 uses the Huffman tree to translate the binary string in Binary.txt. There are two outputs, one of the codewords corresponding to the translated letters and one of the translated letters.
Letters.txt
9 //sample size
a 15 //letter, frequency
b 7
c 8
d 9
e 20
f 6
g 3
h 12
k 4
Binary.txt
10111000111011101101011011101111
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
