ISRO | ISRO CS 2020 | Question 54
The minimum height of an AVL tree with n nodes is
(A) Ceil (log2 (n + 1))
(B) 1.44 log2 n
(C) Floor (log2 (n + 1))
(D) 1.64 log2 n
Answer: (C)
Explanation: Given n nodes in AVL tree:
Minimum:
ceil(log2(n+1))
Maximum:
floor(1.44*log2(n+2) - 0.328)
Option (C) is correct.
Quiz of this Question
Please Login to comment...