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 53
Question 1 of 29
Step 2 of 53
Step 3 of 53
Step 4 of 53
Step 5 of 53
Step 6 of 53
Step 7 of 53
Step 8 of 53
Step 9 of 53
Question 1 of 29
Question 1 of 29
Not this time.
You guessed: 23 is bigger than 31.
What the run did:
23 is not bigger than 31.
Question 1 of 29
Question 2 of 29
Question 2 of 29
Not this time.
You guessed: 12 is bigger than 31.
What the run did:
12 is not bigger than 31.
Question 2 of 29
Question 3 of 29
Question 3 of 29
Not this time.
You guessed: The number being sifted swaps down with its bigger child.
What the run did:
31 is at least as big as its children, so it stops here.
Question 3 of 29
Right.
You guessed: The number being sifted is at least as big as its children, so it stops.
What the run did:
31 is at least as big as its children, so it stops here.
Question 4 of 29
Question 4 of 29
Question 4 of 29
Not this time.
You guessed: 18 is not bigger than 7.
What the run did:
18 is bigger than 7.
Question 5 of 29
Question 5 of 29
Question 5 of 29
Not this time.
You guessed: 56 is not bigger than 18.
What the run did:
56 is bigger than 18.
Question 6 of 29
Question 6 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, 56.
Question 6 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, 56.