This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread 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 Elasticsearch in Action this week in the Big Data 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: 41079
    
  29
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