Create Huffman coding tree in C++