324 views

1 Answer

Best answer
7 votes
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

Related questions

3 votes
3 votes
0 answers
2
sh!va asked Jul 16, 2016
261 views
Hello all,I read somewhere that in R&D organizations like DRDO and ISRO in interviews they any ask to derive something!Any member of this site already attended such inter...
0 votes
0 votes
3 answers
3
0 votes
0 votes
1 answer
4
amitarp818 asked Nov 28, 2023
570 views
Consider the following array of elements<96,42,50,17,15,5,7,11,39,23,6,9,19,100,12>The minimum number of interchanges using buildheap needed to convert it into a max heap...