Wednesday, 9 January 2013

AVL Tree:Data Structure


By on 03:17

AVL Tree is a tree which is widely used in data structures of C++,java,c# etc.AVL stands for Adelson-Velskki & Landis(Name of 2 Developers).Its a balanced binary tree.In this tree,the height between the right and left sub-tree never be more than 1. 

Time Complexity of AVL tree in Big O notation:-



Operation    Average Case Complexity
Searching    O(log n)
Insertion    O(log n)
Deletion    O(log n)


AVL Tree Example(Algorithm & Animation):Right and Left Rotation:-

Example:-19,29,39,49,59,56,55,54,51.

Step 1:- 




Step 2:- 



Step 3:-

Step 4:- 


Step 5:- 


Step 6:- 


Step 7:-

Step 8:-


If you have any query then leave your comments and don't forgot to follow me on Google+,Facebook,Twitter.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...