loading...

CS301 Assignment No 4 Spring 2012 solution

Suppose you are given a string “You will receive this message in two days, Use Huffman Encoding algorithm to create a binary tree with this string.

Solution Guidelines:

In step 1, You have to create a frequency table of characters along with their frequencies.

 

Character Frequency Character Frequency
NL 1 y 2
u 1 o 2
n 1 w 2
r 1 l 2
c 1 a 2
v 1 t 2
h 1 s 4
m 1 i 4
g 1 e 5
d 1 SP 7

 

In step 2: You have to create Binary Tree from letters and their frequencies created in step 1.

DOWNLOAD SOLUTION HERE
loading...