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 2 of 57
Question 1 of 33
Step 2 of 57
Step 3 of 57
Step 4 of 57
Step 5 of 57
Step 7 of 57
Step 8 of 57
Step 9 of 57
Step 10 of 57
Question 1 of 33
Question 1 of 33
Question 1 of 33
Not this time.
You guessed: 42 is not bigger than 18.
What the run did:
42 is bigger than 18.
Question 2 of 33
Question 2 of 33
Question 2 of 33
Not this time.
You guessed: 56 is not bigger than 42.
What the run did:
56 is bigger than 42.
Question 3 of 33
Question 3 of 33
Right.
You guessed: The number being sifted swaps down with its bigger child.
What the run did:
Swap 18 down with its bigger child, 56.
Question 3 of 33
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 18 down with its bigger child, 56.
Question 4 of 33
Question 4 of 33
Question 4 of 33
Not this time.
You guessed: 23 is not bigger than 12.
What the run did:
23 is bigger than 12.
Question 5 of 33
Question 5 of 33
Question 5 of 33
Not this time.
You guessed: 31 is not bigger than 23.
What the run did:
31 is bigger than 23.
Question 6 of 33
Question 6 of 33
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 6 of 33
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.