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 29 of 53
Question 19 of 29
Step 29 of 53
Step 30 of 53
Step 31 of 53
Step 32 of 53
Step 35 of 53
Step 36 of 53
Step 37 of 53
Step 38 of 53
Question 19 of 29
Question 19 of 29
Not this time.
You guessed: 18 is bigger than 23.
What the run did:
18 is not bigger than 23.
Question 19 of 29
Question 20 of 29
Question 20 of 29
Question 20 of 29
Not this time.
You guessed: 31 is not bigger than 23.
What the run did:
31 is bigger than 23.
Question 21 of 29
Question 21 of 29
Right.
You guessed: The number being sifted swaps down with its bigger child.
What the run did:
Swap 23 down with its bigger child, 31.
Question 21 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 23 down with its bigger child, 31.
Question 22 of 29
Question 22 of 29
Question 22 of 29
Not this time.
You guessed: 18 is not bigger than 7.
What the run did:
18 is bigger than 7.
Question 23 of 29
Question 23 of 29
Question 23 of 29
Not this time.
You guessed: 23 is not bigger than 18.
What the run did:
23 is bigger than 18.
Question 24 of 29
Question 24 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, 23.
Question 24 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, 23.