2. (35 pts)
Use more detail programming to compress some pages of English sentences
by using greedy algorithm:
(a) Draw a Huffman encoding tree for the following 10 characters with their
frequencies:
A (13), B(11), C(15), D(9), E(18), F(16), G(20), H(30), period(12), comma(10)
(b) How many minimum number of bits can you represent the above characters?
(c) Write a detail level of pseudocodes to process the Huffman encoding function.
(You may use any language; You decide the number of bits representation.)