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 20 of 53
Question 13 of 29
Step 20 of 53
Step 21 of 53
Step 22 of 53
Step 23 of 53
Step 24 of 53
Step 25 of 53
Step 26 of 53
Question 13 of 29
Question 13 of 29
Question 13 of 29
Not this time.
You guessed: 42 is not bigger than 12.
What the run did:
42 is bigger than 12.
Question 14 of 29
Question 14 of 29
Not this time.
You guessed: 31 is bigger than 42.
What the run did:
31 is not bigger than 42.
Question 14 of 29
Question 15 of 29
Question 15 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, 42.
Question 15 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, 42.
Question 16 of 29
Question 16 of 29
Question 16 of 29
Not this time.
You guessed: 18 is not bigger than 12.
What the run did:
18 is bigger than 12.
Question 17 of 29
Question 17 of 29
Not this time.
You guessed: 7 is bigger than 18.
What the run did:
7 is not bigger than 18.
Question 17 of 29
Question 18 of 29
Question 18 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 18 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.