Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How To Create AVL. Give Me Only Code When Balancing Factor is Voilate(>1||<-1) My Program Not Balancing Well An Avl Tree If
Any One Have Simple Algo Or Steps PLz Tell Me For Building AVL TRee
My Code Is very Large so that i post my Code If anyone Want To Check My code The tell me I post That Code.
Regards
Murtaza Malik
Posted
Updated 20-Dec-11 20:34pm
v2
Comments
Richard MacCutchan 21-Dec-11 3:58am    
No do not post code and expect people to 'fix' it.

1 solution

Hi,

Here is the code you wanted for AVL balancing (tree rotations).

http://cmcrossroads.com/bradapp/ftp/src/libs/C++/AvlTrees.html

This is another good tutorial, contains code as well

http://www.eternallyconfuzzled.com/tuts/datastructures/jsw_tut_avl.aspx

and this book is probably the best of the bunch going into a lot of depth but is not for the faint hearted....

http://www.amazon.co.uk/Introduction-Algorithms-T-Cormen/dp/0262533057

Hope this helps.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900