Huffman Encoding

Constructs a code table containing a binary Huffman code from a given input file, containing a set of ASCII characters and their corresponding frequency. Click to view file

Input

LF  2
.  1
M   7
c    3
d    5
e    14
f  2

Output

LF  10111
.     10110
M   111
c    100
d    110
e     0
f     1010