I have a minheap that contains about 60 nodes inside, each of which have references to their left and right children. My assignment is to get the huffman encoding for each of the 'leaves'(nodes with no children).

The nodes themselves have a character associated with it. Going to the left is a 0, and going to the right is a 1, and once we reach the leaf I have to print out its 'encoding. So a might be 00110, or something.

Anyone know how to go about traversing a minheap?