| Author |
Help me please with Java binary tree
|
Ahrumi Lee
Greenhorn
Joined: Jul 15, 2004
Posts: 6
|
|
I'm struggling with simple java codes..could anyone please help me with these two problems? Given a binary tree that has integers (this is not a binary tree that is ordered properly), what code will find the maximum element?
|
 |
Nicolaas van Rensburg
Greenhorn
Joined: Jul 16, 2004
Posts: 8
|
|
The first option that is available to you, is logiacally sorting the tree and then transversing, moving through, the array. If you want to avoid sorting the tree, you can search through your Object, Vector etc. What are you using to store the tree in?
|
 |
 |
|
|
subject: Help me please with Java binary tree
|
|
|