guess the next step: Heap sort
Before each step plays, guess what it does. The page then shows the step as the run takes it and says why, the same sentence the watch page says there.
Step 22 of 34
Question 13 of 17
Step 22 of 34
Step 23 of 34
Step 24 of 34
Step 25 of 34
Step 28 of 34
Step 29 of 34
Step 30 of 34
Question 13 of 17
Question 13 of 17
Question 13 of 17
Not this time.
You guessed: 31 is not bigger than 12.
What the run did:
31 is bigger than 12.
Question 14 of 17
Question 14 of 17
Not this time.
You guessed: 7 is bigger than 31.
What the run did:
7 is not bigger than 31.
Question 14 of 17
Question 15 of 17
Question 15 of 17
Right.
You guessed: The number being sifted swaps down with its bigger child.
What the run did:
Swap 12 down with its bigger child, 31.
Question 15 of 17
Not this time.
You guessed: The number being sifted is at least as big as its children, so it stops.
What the run did:
Swap 12 down with its bigger child, 31.
Question 16 of 17
Question 16 of 17
Question 16 of 17
Not this time.
You guessed: 12 is not bigger than 7.
What the run did:
12 is bigger than 7.
Question 17 of 17
Question 17 of 17
Right.
You guessed: The number being sifted swaps down with its bigger child.
What the run did:
Swap 7 down with its bigger child, 12.
That is every question on this run: 1 of 17 right.
Question 17 of 17
Not this time.
You guessed: The number being sifted is at least as big as its children, so it stops.
What the run did:
Swap 7 down with its bigger child, 12.
That is every question on this run: 0 of 17 right.