Also called Heapify, Floyd's method and Bottom-up heap construction.
fresh numbers
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 building a heap's own run on the numbers shown.
choose one
1question 1
On which of these rows does building a heap make no swap at all?
the answer, and why
the answer is C
On 99, 85, 74, 14, 10, 12, 68 every parent is at least as big as its children, so every sift stops at once and building makes no swap.
if you chose another
ABuilding a heap makes 1 swap on this row: a parent there is smaller than a child.
BBuilding a heap makes 1 swap on this row: a parent there is smaller than a child.
DBuilding a heap makes 1 swap on this row: a parent there is smaller than a child.