Huffman Tree in Java
问题 I have a problem with my Huffman tree code. In the main method I input a String of Symbols and I also input an Integer array containing the frequency of the Symbols. It should print out each Symbol and its Huffman code, but I think its wrong... Here is the code: package huffman; import java.util.*; abstract class HuffmanTree implements Comparable<HuffmanTree> { public final int frequency; // the frequency of this tree public HuffmanTree(int freq) { frequency = freq; } // compares on the