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 3 of 21
Question 1 of 15
Step 3 of 21
Step 4 of 21
Step 5 of 21
Step 6 of 21
Step 7 of 21
Step 8 of 21
Step 9 of 21
Step 10 of 21
Question 1 of 15
Question 1 of 15
Question 1 of 15
Not this time.
You guessed: 67 is not bigger than 38.
What the run did:
67 is bigger than 38.
Question 2 of 15
Question 2 of 15
Question 2 of 15
Not this time.
You guessed: 85 is not bigger than 67.
What the run did:
85 is bigger than 67.
Question 3 of 15
Question 3 of 15
Right.
You guessed: It swaps down with its bigger child.
What the run did:
Swap 38 down with its bigger child, 85.
Question 3 of 15
Not this time.
You guessed: It is at least as big as its children, so it stops.
What the run did:
Swap 38 down with its bigger child, 85.
Question 3 of 15
Not this time.
You guessed: It has no children, so it stops.
What the run did:
Swap 38 down with its bigger child, 85.
Question 4 of 15
Question 4 of 15
Not this time.
You guessed: It swaps down with its bigger child.
What the run did:
38 has no children, so it stops here.
Question 4 of 15
Not this time.
You guessed: It is at least as big as its children, so it stops.
What the run did:
38 has no children, so it stops here.
Question 4 of 15
Right.
You guessed: It has no children, so it stops.
What the run did:
38 has no children, so it stops here.
Question 5 of 15
Question 5 of 15
Question 5 of 15
Not this time.
You guessed: 46 is not bigger than 23.
What the run did:
46 is bigger than 23.
Question 6 of 15
Question 6 of 15
Question 6 of 15
Not this time.
You guessed: 54 is not bigger than 46.
What the run did:
54 is bigger than 46.