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 41 of 53
Question 25 of 29
Step 41 of 53
Step 42 of 53
Step 43 of 53
Step 44 of 53
Step 47 of 53
Step 48 of 53
Step 49 of 53
Question 25 of 29
Question 25 of 29
Question 25 of 29
Not this time.
You guessed: 18 is not bigger than 12.
What the run did:
18 is bigger than 12.
Question 26 of 29
Question 26 of 29
Not this time.
You guessed: 7 is bigger than 18.
What the run did:
7 is not bigger than 18.
Question 26 of 29
Question 27 of 29
Question 27 of 29
Right.
You guessed: The number being sifted swaps down with its bigger child.
What the run did:
Swap 12 down with its bigger child, 18.
Question 27 of 29
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, 18.
Question 28 of 29
Question 28 of 29
Question 28 of 29
Not this time.
You guessed: 12 is not bigger than 7.
What the run did:
12 is bigger than 7.
Question 29 of 29
Question 29 of 29
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 29 right.
Question 29 of 29
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 29 right.