guess the next step: Hash table that grows
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 43
Question 19 of 29
Step 25 of 43
Step 26 of 43
Step 27 of 43
Step 28 of 43
Step 29 of 43
Step 30 of 43
Step 31 of 43
Step 32 of 43
Question 19 of 29
Question 19 of 29
Not this time.
You guessed: Slot 2 is empty, so 25 is not in the table yet.
What the run did:
Slot 2 holds 10, so look at the next slot for 25.
Question 19 of 29
Right.
You guessed: Slot 2 holds another number, so look at the next.
What the run did:
Slot 2 holds 10, so look at the next slot for 25.
Question 19 of 29
Not this time.
You guessed: Slot 2 already holds 25, so turn it away.
What the run did:
Slot 2 holds 10, so look at the next slot for 25.
Question 20 of 29
Question 20 of 29
Right.
You guessed: Slot 3 is empty, so 25 is not in the table yet.
What the run did:
Slot 3 is empty, so 25 is not in the table yet.
Question 20 of 29
Not this time.
You guessed: Slot 3 holds another number, so look at the next.
What the run did:
Slot 3 is empty, so 25 is not in the table yet.
Question 20 of 29
Not this time.
You guessed: Slot 3 already holds 25, so turn it away.
What the run did:
Slot 3 is empty, so 25 is not in the table yet.
Question 21 of 29
Question 21 of 29
Right.
You guessed: With 25, no more than half the slots would hold a number, so they stay.
What the run did:
With 25, 4 of the 8 slots would hold a number. That is no more than half, so the slots stay as they are.
Question 21 of 29
Not this time.
You guessed: With 25, more than half the slots would hold a number, so double them.
What the run did:
With 25, 4 of the 8 slots would hold a number. That is no more than half, so the slots stay as they are.
Question 22 of 29
Question 22 of 29
Not this time.
You guessed: The home of 31 is slot 5.
What the run did:
31 leaves 7 when divided by 8, so its home is slot 7.
Question 22 of 29
Not this time.
You guessed: The home of 31 is slot 6.
What the run did:
31 leaves 7 when divided by 8, so its home is slot 7.
Question 22 of 29
Right.
You guessed: The home of 31 is slot 7.
What the run did:
31 leaves 7 when divided by 8, so its home is slot 7.
Question 23 of 29
Question 23 of 29
Right.
You guessed: Slot 7 is empty, so 31 is not in the table yet.
What the run did:
Slot 7 is empty, so 31 is not in the table yet.
Question 23 of 29
Not this time.
You guessed: Slot 7 holds another number, so look at the next.
What the run did:
Slot 7 is empty, so 31 is not in the table yet.
Question 23 of 29
Not this time.
You guessed: Slot 7 already holds 31, so turn it away.
What the run did:
Slot 7 is empty, so 31 is not in the table yet.
Question 24 of 29
Question 24 of 29
Not this time.
You guessed: With 31, no more than half the slots would hold a number, so they stay.
What the run did:
With 31, 5 of the 8 slots would hold a number, more than half. Double them to 16, and take all 4 numbers out to move.
Question 24 of 29
Right.
You guessed: With 31, more than half the slots would hold a number, so double them.
What the run did:
With 31, 5 of the 8 slots would hold a number, more than half. Double them to 16, and take all 4 numbers out to move.