1,941 views

1 Answer

0 votes
0 votes
Answer : (D) 7

We know the recursive formula for finding minimum number of nodes required to construct an AVL tree of height h is :

N(h) = 1 + N(h-1) + N(h-2) ;

N(0) = 1; N(1) = 2;

If you solve above equation, you will get

N(7) = 54 & N(8) = 88

This means that minimum 88 nodes are required to construct AVL tree of height 8. So with the given 77 nodes we can construct AVL tree of maximum height 7.

Related questions

0 votes
0 votes
2 answers
2
Pranabesh Ghosh 1 asked Aug 30, 2016
563 views
Given an array of integers what is the worst case time complexity that would find pair of integers which are same?A) O(nlogn)B) O(n)C) O()D) O(nloglogn)
2 votes
2 votes
1 answer
3
Pranabesh Ghosh 1 asked Aug 30, 2016
367 views
f(char a[10]) { int i = sizeof(a); printf("%d\n", i); }Assuming pointer size is 4bytes, what is the output of the code if function f is calledA) 4B) 40C) 1D) 10
4 votes
4 votes
1 answer
4
Pranabesh Ghosh 1 asked Aug 30, 2016
695 views
A min heap with 1000 elements is stored in an array. What is the maximum possible index number for 9th min element?A) 254B) 100C) 9D) 511