PS homework 3, Adaptive Huffman coding