Question: Write a program in java that will implement the Huffman encoding compression algorithm. You do not need to read from a file or store to
Write a program in java that will implement the Huffman encoding compression algorithm. You do not need to read from a file or store to a file. Simply create the Huffman binary tree, encode, and decode the following sequences (there are 3): enqueue, cabbabbac, madam.
i. Build a Huffman tree for each of the bolded words above
ii. Encode (compress) each word using the Huffman tree that you generated for that sequence and display the encoded bits.
iii. Decode the bits back to the original characters and display the decoded bits.
iiii. For each section of your code, describe (with comments in your source code) what part of the algorithm each section of the code is handling.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
