Week 13 - AVL Trees
Week 13 - AVL Trees
AVL Trees
AVL Trees
ref sec 15.1 Data Structures, Algorithms and
applications in C++
AVL trees are balanced trees which were introduced in 1962 by two
Russian scientists Adelson-Velski and Landis.
AVL search tree is a binary search tree that is also an AVL tree.
Are the following Binary Trees AVL trees ?
Searching an AVL tree
• Search is exactly similar to how it is
conducted in a binary search tree (the code
may be used as it is)
• Since height of AVL tree with n elements is
O(logn) therefore search time is also
O(logn).
Balance factor of nodes in AVL tree