Consider a binary min heap containing n elements and every node is having degree 2 ( i.e. full binary min heap tree). What is the probability of finding the largest element at the last level ?
(A) 1/2
(B) 1
(C) 1/n
(D) 1/2^n
Answer: (B)
Explanation:
Always 1 as maximum element will always be present in the leaf nodes in case of binary min heap.
Quiz of this Question