homework for huffman code(part 2)