O(1) or$\left ( 2^{45}-1 \right )$

if it is min heap and u r searching from root

if it is min heap and u r searching from root

The Gateway to Computer Science Excellence

0 votes

0

@Shaik

draw this heap tree

1,4,2,5,6,7,3

See the number of comparison to find 3rd minimum is $2^{3}-1$ or not??

draw this heap tree

1,4,2,5,6,7,3

See the number of comparison to find 3rd minimum is $2^{3}-1$ or not??

0

that is in-directly referring height, when height of root=1

if height of root=0, then it would be 2^{(h-1)} - 1

52,315 questions

60,437 answers

201,777 comments

95,257 users