retagged by
1,067 views
1 votes
1 votes
what is the maximum possible hight of AVL tree with 54 node?

is there any general method to solve this question?
retagged by

1 Answer

Best answer
0 votes
0 votes
Intutively to obtain maximum height, you'll try to make tree unbalanced and in case of AVL trees height difference of only one is allowed between left and right nodes.

So if a maximum height tree is constructed using n nodes has height h, then one of it's child should have height h-1 and other should have h-2 and they both should also be maximum possible height AVL tree. This gives us a recursive equation.

if n(x) represents number of nodes reqd. to create an AVL tree with max. height x, then we can write,

$n(h) = 1 + n(h-1) + n(h-2)$

base conditions, $n(0) = 1, n(1)= 2$

Now you can find, n(0), n(1), n(2),.. and check where 54 falls
selected by

Related questions

1 votes
1 votes
1 answer
1
kd..... asked Apr 13, 2019
788 views
here what to do first as FIZZA and IMRAN both are unbalanced than either to do RR rotation from FIZZA-IMRAN-NAVEEN or RL rotation from IMRAN-NAVEEN-LOVELY
1 votes
1 votes
1 answer
2
Lakshman Bhaiya asked Nov 6, 2018
689 views
The minimum number of node in an AVL Tree of height $10$ is ____________
7 votes
7 votes
9 answers
3
syncronizing asked Sep 15, 2018
8,924 views
The number of different orders are possible for elements 1, 2, 3, 4, 5, 6, 7 to be inserted in to empty AVL tree such that no rotation will be done and element ‘4’ is...
1 votes
1 votes
2 answers
4