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 19, 47, 36, 43, 35. What is the row once the heap is built, before the first swap of the top?
the answer, and why
the answer is B
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: 47, 43, 36, 19, 35.
if you chose another
AThat stops the sift of 19 one round early. 43 is bigger, so 19 goes down again.
CThat is the end of the sort.
DThat is the start. 19 is smaller than its child 47.