Results 1 to 1 of 1
Thread: Traversing a min heap
- 05-08-2011, 06:44 PM #1
Traversing a min heap
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?
- By english in forum SWT / JFaceReplies: 0Last Post: 12-14-2010, 02:00 PM
- By Lil_Aziz1 in forum New To JavaReplies: 2Last Post: 05-30-2010, 06:05 PM
- By chico9 in forum EclipseReplies: 3Last Post: 04-03-2010, 10:49 AM
- By Inks in forum AWT / SwingReplies: 12Last Post: 03-11-2009, 06:15 AM
- By Java Tip in forum Java TipReplies: 0Last Post: 01-14-2008, 10:33 AM