Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
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 Badass: Making Users Awesome this week in the Game Development 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: 41531
    
  31
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