This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes General Computing and the fly likes Applying AVL algorithm to an unbalanced binary search tree Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Applying AVL algorithm to an unbalanced binary search tree" Watch "Applying AVL algorithm to an unbalanced binary search tree" New topic
Author

Applying AVL algorithm to an unbalanced binary search tree

Zak Tacc
Greenhorn

Joined: Feb 01, 2010
Posts: 25
I have an method that will rotate an unbalanced node in a Binary Search Tree (it checks a node for balance and then it rotates it accordingly). But if I were to apply it to a Binary Search tree of any size/balance (it will be likely that many nodes will need re-balancing), how could I iterate through the whole tree effectively?

Thanks
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38449
    
  23
Not a "beginning" question: too difficult.
Moving thread.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applying AVL algorithm to an unbalanced binary search tree