Times method using Map.
Huffman coding finished.