given the sorted freq, the O(n) Huffman code
union find structure, union by rank, path compression
Merge branch 'master' of https://github.com/python27/AlgorithmSolution