search
Log In
1 vote
1.9k views
minimum no of nodes n AVL tree of height 11 is
a)230  b)231  c)232 c)233
in Programming 1.9k views

1 Answer

4 votes

Ans should be C) 232  (assume root at height 1)


edited by
1
I think with H=1, we need to have at least 2 node

and with H=0,  N(0)= 1

N(1)=2

And rest procedure is correct but your ans is for h=10 , so for h=11

N(11)= 1 + N(10) + N(9)

         = 1 + 232 + 143

         = 376
0
it will be correct , if i assume root node at hight 0 , but i assume root at height 1 so at height 1 no of node is only 1 which is root only ..( i mentioned in diagram )

as here not given what is height of root ... i assumed according to option ...

so ans 232 is correct :)
3
If you are assuming according to the options given then its alright but in general definition of Height of a tree says root has zero height.

I think You can assume level of root as 1 or 0.
0
Well the answer is based on assumption that Height=1 at Root, but usually we follow root at height 0.

Related questions

3 votes
1 answer
1
1.2k views
Let T be a binary search tree with n nodes and Sn be the average number of comparisons required for successful search and Un be the average number of comparison required for an unsuccessful search. Then what is the relation between Sn, Un and n
asked Jul 16, 2018 in Programming hrcule 1.2k views
3 votes
0 answers
2
1.1k views
When node 50 will be deleted, what will be resultant AVL tree?
asked Jan 10, 2018 in Programming AnilGoudar 1.1k views
3 votes
1 answer
3
2.2k views
What is the max possible height of an AVL tree with 20 nodes? a. 4 b.5 c.6 d.7 In my opinion answer should be b.5 because height of a tree with 1 node is 0 not 1, and recurrence relation to calculate maximum height of an AVL tree is: T(H) = T(H-1) + T(H-2) + 1
asked Jul 27, 2017 in Programming Manu Thakur 2.2k views
0 votes
3 answers
4
328 views
Which sequence If inserted in AVL tree will cause No adjustment in tree? a) 1 2 3 4 5 b) 5 4 3 2 1 c) 3 2 4 1 5 d) 4 3 1 2 5
asked May 9, 2017 in Programming slowpoke 328 views
...