144 views

2 Answers

4 votes
4 votes

We need to perform swapping, to get max-heap.

Swapped $22$ and $42,$ we get

Swapped $22$ and $26,$ we get max-heap.

So, the correct answer is $9.$

3 votes
3 votes
$22$ and $42$ will get swapped. Then $22$ and $26.$ So, final position of $22$ will be $9.$
Answer:

Related questions

3 votes
3 votes
2 answers
1
gatecse asked Aug 18, 2020
159 views
Consider a min heap implemented as an array with the elements $1,2,3,6,7,8,9,10.$ The level (starting from 1) in which $7$ is stored is _______
4 votes
4 votes
1 answer
2
gatecse asked Aug 18, 2020
638 views
In a hashtable with $20$ slots $30$ records are inserted with collisions being resolved by chaining. What is the expected number of key comparisons in an unsuccessful sea...