The test's questions that a run answers, asked again on new numbers whenever you like. The answer, its working and the reason for every other choice come from heap sort's own run on the numbers shown.
choose one
1question 1
Heap sort starts on 10, 37, 29, 32, 25. What is the row once the heap is built, before the first swap of the top?
the answer, and why
the answer is D
Each place with children, from the last to the top, sifts its number down, swapping it with its bigger child while that child is bigger: 37, 32, 29, 10, 25.
if you chose another
AThat stops the sift of 10 one round early. 32 is bigger, so 10 goes down again.
BThat is the end of the sort.
CThat is the start. 10 is smaller than its child 37.