File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "scapegoat tree rebuilding...please help!" Watch "scapegoat tree rebuilding...please help!" New topic

scapegoat tree rebuilding...please help!

Thomas Dallaire

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?

I agree. Here's the link:
subject: scapegoat tree rebuilding...please help!
It's not a secret anymore!