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