546 views

1 Answer

Best answer
7 7 votes

There is a minor difference between the 2 questions..In the previous year gate question , it is asked that :

Minimum size of an array required to store any binary tree with 'n' nodes

So we have to consider all sorts of binary trees ..Hence we are considering worst case which is skew binary tree                       which  takes space for n nodes     =    2n  -  1

But in the question mentioned here , it says :

 Minimum size an array may require to store a binary tree

So it is actually a weaker statement than the previous one..It considers the best case scenario actually..It is not considering all binary trees as it is not saying  "any binary tree"

So here we consider the best case which corresponds to complete binary tree..Hence n no of spaces required in an array for storing a binary tree..So the possible minimum size that an array may need to store a binary tree is 'n' only..

Hence A) is the correct answer..

• selected by
Position:
Show:

Related questions

3 3 votes
2 2 answers
443
443 views
ShivankXD asked Jan 8
443 views
A hash table of size 11 using the hash function h(x)=x mod 11 and quadratic probing with hi(x)=(h(x)+i^2)  mod 11 , i∈{0,1,2,…,10}.The key values are given in the followi...
2 2 votes
1 answers 1 answer
274
274 views
ShivankXD asked Jan 8
274 views
Which of the following is/are dynamic data structure?A) Linked listB) StackC) ArrayD) Binary tree
1 1 vote
1 1 answer
359
359 views
harishdewangan asked Aug 12, 2025
359 views
An implementation of a queue Q, using two S1 and S2 is given below:void enqueue(Q,x){ push(S1,x);}void dequeue(Q,x){ if (stack - empty(S2)) then if(stack- em...
2 2 votes
1 answers 1 answer
535
535 views
harishdewangan asked Aug 6, 2025
535 views
The number of binary search trees possible with 7 keys 10,20,30,40,50,60,70 such that the key with value 30 is at the second level of the tree is equal to ___________.