600 views
0 votes
0 votes

consider the min heap tree.minimum number of comparisons to required to maintain the heap property after deletion of root are

 

according to me 3, because we just need to check b/w the 2 childs as parent will be definitely greater than both of its children!

am i wrong? 

2 Answers

0 votes
0 votes
I think total comparisons are 5

between 196-120  196-130

then        196-160  196-170

then         196-195
0 votes
0 votes
no of comparision is =3

i.e is 196 to 120, 196 to 140,  196 to 180

Related questions

0 votes
0 votes
3 answers
1
0 votes
0 votes
1 answer
2
amitarp818 asked Nov 28, 2023
569 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...
1 votes
1 votes
1 answer
3
Anmol pratap singh asked Jul 8, 2023
577 views
0 votes
0 votes
1 answer
4