Building a huffman queue.