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 20
Question 1 of 14
Step 3 of 20
Step 4 of 20
Step 5 of 20
Step 6 of 20
Step 7 of 20
Step 8 of 20
Step 9 of 20
Step 10 of 20
Question 1 of 14
Question 1 of 14
Question 1 of 14
Not this time.
You guessed: 62 is not bigger than 4.
What the run did:
62 is bigger than 4.
Question 2 of 14
Question 2 of 14
Right.
You guessed: It swaps down with its bigger child.
What the run did:
Swap 4 down with its only child, 62.
Question 2 of 14
Not this time.
You guessed: It is at least as big as its children, so it stops.
What the run did:
Swap 4 down with its only child, 62.
Question 2 of 14
Not this time.
You guessed: It has no children, so it stops.
What the run did:
Swap 4 down with its only child, 62.
Question 3 of 14
Question 3 of 14
Not this time.
You guessed: It swaps down with its bigger child.
What the run did:
4 has no children, so it stops here.
Question 3 of 14
Not this time.
You guessed: It is at least as big as its children, so it stops.
What the run did:
4 has no children, so it stops here.
Question 3 of 14
Right.
You guessed: It has no children, so it stops.
What the run did:
4 has no children, so it stops here.
Question 4 of 14
Question 4 of 14
Question 4 of 14
Not this time.
You guessed: 71 is not bigger than 18.
What the run did:
71 is bigger than 18.
Question 5 of 14
Question 5 of 14
Not this time.
You guessed: 50 is bigger than 71.
What the run did:
50 is not bigger than 71.
Question 5 of 14
Question 6 of 14
Question 6 of 14
Right.
You guessed: It swaps down with its bigger child.
What the run did:
Swap 18 down with its bigger child, 71.
Question 6 of 14
Not this time.
You guessed: It is at least as big as its children, so it stops.
What the run did:
Swap 18 down with its bigger child, 71.
Question 6 of 14
Not this time.
You guessed: It has no children, so it stops.
What the run did:
Swap 18 down with its bigger child, 71.