Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Blog 

Huffman Encoding Tree v2

Language: Layout:
+ ] Show input
Compilation time: 0.94 sec, absolute running time: 0.14 sec, cpu time: 0.08 sec, memory peak: 32 Mb, absolute service time: 1.09 sec  
fork mode |  history  | discussion
Huffman Tree
[ * : 100 ]
[ f : 45 ]
[ * : 55 ]
[ * : 25 ]
[ c : 12 ]
[ d : 13 ]
[ * : 30 ]
[ * : 14 ]
[ a : 5 ]
[ b : 9 ]
[ e : 16 ]

Encoded Mapping
f : 0
c : 100
d : 101
a : 1100
b : 1101
e : 111

Printing encoding of text : 'facade'
[0][1100][100][1100][101][111]

    
                
Advertise here.