Question: isn't the assumption that every node would make 2 comparisons false? Since lets consider the case where the root compares its value with its children
isn't the assumption that every node would make comparisons false? Since lets consider the case where the root compares its value with its children and it makes a swap. Then the swapped value has to be compared with its children, wne then that might propoagte till the leaf. So in this case, doesn't it require more than swaps per node?
: simile & swaps with & swops with
Now compores with
& and swaps with
O Then drops deun.
Now will have to
compores with &
and would have to
swap with So
it would require more
then comporisons
per node?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
