guess the next step: Building a heap
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 21
Question 7 of 15
Step 10 of 21
Step 11 of 21
Step 12 of 21
Step 13 of 21
Step 14 of 21
Step 15 of 21
Step 16 of 21
Step 17 of 21
Question 7 of 15
Question 7 of 15
Right.
You guessed: It swaps down with its bigger child.
What the run did:
Swap 23 down with its bigger child, 54.
Question 7 of 15
Not this time.
You guessed: It is at least as big as its children, so it stops.
What the run did:
Swap 23 down with its bigger child, 54.
Question 7 of 15
Not this time.
You guessed: It has no children, so it stops.
What the run did:
Swap 23 down with its bigger child, 54.
Question 8 of 15
Question 8 of 15
Not this time.
You guessed: It swaps down with its bigger child.
What the run did:
23 has no children, so it stops here.
Question 8 of 15
Not this time.
You guessed: It is at least as big as its children, so it stops.
What the run did:
23 has no children, so it stops here.
Question 8 of 15
Right.
You guessed: It has no children, so it stops.
What the run did:
23 has no children, so it stops here.
Question 9 of 15
Question 9 of 15
Question 9 of 15
Not this time.
You guessed: 54 is not bigger than 11.
What the run did:
54 is bigger than 11.
Question 10 of 15
Question 10 of 15
Question 10 of 15
Not this time.
You guessed: 85 is not bigger than 54.
What the run did:
85 is bigger than 54.
Question 11 of 15
Question 11 of 15
Right.
You guessed: It swaps down with its bigger child.
What the run did:
Swap 11 down with its bigger child, 85.
Question 11 of 15
Not this time.
You guessed: It is at least as big as its children, so it stops.
What the run did:
Swap 11 down with its bigger child, 85.
Question 11 of 15
Not this time.
You guessed: It has no children, so it stops.
What the run did:
Swap 11 down with its bigger child, 85.
Question 12 of 15
Question 12 of 15
Question 12 of 15
Not this time.
You guessed: 67 is not bigger than 11.
What the run did:
67 is bigger than 11.