recategorized by
1,179 views
5 votes
5 votes
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 36th  smallest element
recategorized by

2 Answers

0 votes
0 votes
Its P(65th largest element given that a level is chsen and an elemwnt is chosen from it)

So P= ((1/7)*(1/37))/((1/7)+(1/7)*(1/2)+......+ (1/7)*(1/2^5)+(1/7)*(1/37))

P=0.0135
0 votes
0 votes

According to me, 36 can be present at any level except @0th, hence

p= probablity of choosing 36th  smallest element provided any level is choosen

p= 1/7∗(1/2+1/4+1/8+1/16+1/32+1/37)  

p= 0.1422

Related questions

0 votes
0 votes
1 answer
1
2 votes
2 votes
1 answer
2
Thor-o-s asked Sep 1, 2022
391 views
Can anyone please explain how to find “ i “ smallest elements from an array whose elements are distinctPlease use max heap to explain the working input : n distinct e...
1 votes
1 votes
0 answers
4
Balaji Jegan asked Jun 4, 2018
1,058 views
How many max-heaps can be formed with the following elements?$\{1,1,1,2,2,2,3,3,3,4,4,4\}$