Huffman Tree visualization algorithm