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 10 of 49
Question 7 of 28
Step 10 of 49
Step 11 of 49
Step 12 of 49
Step 13 of 49
Step 16 of 49
Step 17 of 49
Step 18 of 49
Step 19 of 49
Question 7 of 28
Question 7 of 28
Not this time.
You guessed: 42 is bigger than 56.
What the run did:
42 is not bigger than 56.
Question 7 of 28
Question 8 of 28
Question 8 of 28
Not this time.
You guessed: 31 is bigger than 56.
What the run did:
31 is not bigger than 56.
Question 8 of 28
Question 9 of 28
Question 9 of 28
Not this time.
You guessed: The number being sifted swaps down with its bigger child.
What the run did:
56 is at least as big as its children, so it stops here.
Question 9 of 28
Right.
You guessed: The number being sifted is at least as big as its children, so it stops.
What the run did:
56 is at least as big as its children, so it stops here.
Question 10 of 28
Question 10 of 28
Question 10 of 28
Not this time.
You guessed: 42 is not bigger than 7.
What the run did:
42 is bigger than 7.
Question 11 of 28
Question 11 of 28
Not this time.
You guessed: 31 is bigger than 42.
What the run did:
31 is not bigger than 42.
Question 11 of 28
Question 12 of 28
Question 12 of 28
Right.
You guessed: The number being sifted swaps down with its bigger child.
What the run did:
Swap 7 down with its bigger child, 42.
Question 12 of 28
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, 42.