Huffman coding: Difference between revisions

Gave non-sorted example for test runs.
(Added task with Java)
 
(Gave non-sorted example for test runs.)
Line 26:
D: 111</pre>
 
Write a program which reads in symbols and frequencies in pairs separated by whitespace and generates Huffman codes for each symbol. Test your program with the following line of letter frequencies, as input:
<pre>"B 25 C 12.5 D 12.5 A 50 \n"</pre>
 
=={{header|Java}}==
Anonymous user