guess the next step: Changing a number in 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 25 of 40
Question 13 of 22
Step 25 of 40
Step 26 of 40
Step 27 of 40
Step 28 of 40
Step 29 of 40
Step 30 of 40
Step 31 of 40
Step 32 of 40
Question 13 of 22
Question 13 of 22
Not this time.
You guessed: 9 is smaller than the number above it, so it climbs.
What the run did:
9 is at the top, so it stays.
Question 13 of 22
Not this time.
You guessed: 9 is not smaller than the number above it, so it stays.
What the run did:
9 is at the top, so it stays.
Question 13 of 22
Right.
You guessed: 9 is at the top, so it stays.
What the run did:
9 is at the top, so it stays.
Question 14 of 22
Question 14 of 22
Not this time.
You guessed: 27 becomes 70, smaller, so it may need to climb.
What the run did:
Change 27 to 70. It got no smaller, so it is still no smaller than anything above it, but it may need to sink.
Question 14 of 22
Right.
You guessed: 27 becomes 70, no smaller, so it may need to sink.
What the run did:
Change 27 to 70. It got no smaller, so it is still no smaller than anything above it, but it may need to sink.
Question 15 of 22
Question 15 of 22
Question 15 of 22
Not this time.
You guessed: 34 is not smaller than 70.
What the run did:
34 is smaller than 70.
Question 16 of 22
Question 16 of 22
Not this time.
You guessed: 61 is smaller than 34.
What the run did:
61 is not smaller than 34.
Question 16 of 22
Right.
You guessed: 61 is not smaller than 34.
What the run did:
61 is not smaller than 34.
Question 17 of 22
Question 17 of 22
Question 17 of 22
Not this time.
You guessed: 70 is no bigger than anything below it, so it stays.
What the run did:
Swap them: 70 sinks below 34.
Question 17 of 22
Not this time.
You guessed: Nothing is below 70, so it stays.
What the run did:
Swap them: 70 sinks below 34.
Question 18 of 22
Question 18 of 22
Not this time.
You guessed: 70 swaps down.
What the run did:
Nothing is below 70, so it stays.
Question 18 of 22
Not this time.
You guessed: 70 is no bigger than anything below it, so it stays.
What the run did:
Nothing is below 70, so it stays.
Question 18 of 22
Right.
You guessed: Nothing is below 70, so it stays.
What the run did:
Nothing is below 70, so it stays.