Two Sigma interview question

How to implement Huffman coding trees.