recategorized by
560 views
0 votes
0 votes
A min heap having $1024$ distinct elements with keys ranging from $0$ to $1023$ is stored in array of $1024$ indices. The maximum difference between $(n/2)^{th}$ element present at maximum level and minimum level is ________. [Assume root is present at $level-1$] ?

Please Tell me the Approach
recategorized by

1 Answer

0 votes
0 votes

ans is 9

512 element  should be present  either at 10 or 11 level (in case of maximum).

512 element  should be present  at 2nd  level (in case of minimum).

hence 9is ths  ans

Related questions

0 votes
0 votes
1 answer
1
5 votes
5 votes
2 answers
2
Ashwani Kumar 2 asked Jan 31, 2017
2,273 views
A min heap having 1024 distinct elements with keys ranging from 0 to 1023 is stored in array of 1024 indices. The maximum difference between the keys of all the element t...
5 votes
5 votes
2 answers
3
vivek9837 asked Oct 7, 2016
1,179 views
A level of a max heap (containing 100 nos) is choosen randomly, on its selection, a node from the same level is choosen randomly. What is the probability that it is the 3...
2 votes
2 votes
2 answers
4
Rajesh Pradhan asked Aug 25, 2016
778 views
A max heap stores unique digits from 1 to 100 in an array.(total 100 elements)What is the maximum possible index number for element 92 ?