Huffman tree with heap

The solution to http://dsalgo.openjudge.cn/dsmoochw6/3/.