AVL Tree – - WordPress.com
21
AVL Tree – A BST where height of two subtrees differs at most one. Permitted balance factors for any node are 0,1 and -1. Balance factor of any node can be computed by subtracting the height of right subtree from height of left subtree. • Insertion, deletion and searching can be performed in O(logn). • Height <= 1.44 * (log n) where is n is number of nodes
-
Upload
khangminh22 -
Category
Documents
-
view
1 -
download
0
Transcript of AVL Tree – - WordPress.com
AVL Tree –
A BST where height of two subtrees differs at most one. Permitted balance factors for any node are 0,1 and -1. Balance factor of any node can be computed by subtracting the height of right subtree from height of left subtree.
• Insertion, deletion and searching can be performed in O(logn).• Height <= 1.44 * (log n) where is n is number of nodes
13
20
3015
10
7
3624
15, 20, 24, 10, 13, 7, 30, 36, 25
25
13
20
30
15
10
7
36
24
2513
24
36
20
10
7
25
30
15