wood burning stoves 2.0*
The moose likes Java in General and the fly likes scapegoat tree rebuilding...please help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "scapegoat tree rebuilding...please help!" Watch "scapegoat tree rebuilding...please help!" New topic
Author

scapegoat tree rebuilding...please help!

Thomas Dallaire
Greenhorn

Joined: Sep 24, 2010
Posts: 7
Hi, I'm working on an assignment for school and I can't seem to get the rebuild function to work in this scapegoat tree.





Instead of sorting the array of nodes I'm trying to traverse the sub tree in order so that I'll end up with a sorted set. The next step would be to add the middle element of the array, then the middle element of the left half, and so on until all the elements from the array have been added to the tree.

So far that's not working though...could anyone offer me some advice as to how I should go about this?

Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: scapegoat tree rebuilding...please help!
 
Similar Threads
Binary Search Tree
Nth Smallest Element of a Binary Search Tree
A question about generics
Draw binary tree structure
Tournament Tree help