guess the next step: Hash table with open addressing
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 1 of 12
Question 1 of 10
Step 1 of 12
Step 2 of 12
Step 3 of 12
Step 4 of 12
Step 5 of 12
Step 6 of 12
Step 7 of 12
Question 1 of 10
Question 1 of 10
Right.
You guessed: The home of 7 is slot 0.
What the run did:
7 leaves 0 when divided by 7, so its home is slot 0.
Question 1 of 10
Not this time.
You guessed: The home of 7 is slot 1.
What the run did:
7 leaves 0 when divided by 7, so its home is slot 0.
Question 1 of 10
Not this time.
You guessed: The home of 7 is slot 2.
What the run did:
7 leaves 0 when divided by 7, so its home is slot 0.
Question 2 of 10
Question 2 of 10
Right.
You guessed: Slot 0 is free, so put 7 there.
What the run did:
Slot 0 is free, so put 7 there.
Question 2 of 10
Not this time.
You guessed: Slot 0 holds another number, so look at the next.
What the run did:
Slot 0 is free, so put 7 there.
Question 2 of 10
Not this time.
You guessed: Slot 0 already holds 7, so turn it away.
What the run did:
Slot 0 is free, so put 7 there.
Question 3 of 10
Question 3 of 10
Right.
You guessed: The home of 15 is slot 1.
What the run did:
15 leaves 1 when divided by 7, so its home is slot 1.
Question 3 of 10
Not this time.
You guessed: The home of 15 is slot 2.
What the run did:
15 leaves 1 when divided by 7, so its home is slot 1.
Question 3 of 10
Not this time.
You guessed: The home of 15 is slot 3.
What the run did:
15 leaves 1 when divided by 7, so its home is slot 1.
Question 4 of 10
Question 4 of 10
Right.
You guessed: Slot 1 is free, so put 15 there.
What the run did:
Slot 1 is free, so put 15 there.
Question 4 of 10
Not this time.
You guessed: Slot 1 holds another number, so look at the next.
What the run did:
Slot 1 is free, so put 15 there.
Question 4 of 10
Not this time.
You guessed: Slot 1 already holds 15, so turn it away.
What the run did:
Slot 1 is free, so put 15 there.
Question 5 of 10
Question 5 of 10
Not this time.
You guessed: The home of 23 is slot 1.
What the run did:
23 leaves 2 when divided by 7, so its home is slot 2.
Question 5 of 10
Right.
You guessed: The home of 23 is slot 2.
What the run did:
23 leaves 2 when divided by 7, so its home is slot 2.
Question 5 of 10
Not this time.
You guessed: The home of 23 is slot 3.
What the run did:
23 leaves 2 when divided by 7, so its home is slot 2.
Question 6 of 10
Question 6 of 10
Right.
You guessed: Slot 2 is free, so put 23 there.
What the run did:
Slot 2 is free, so put 23 there.
Question 6 of 10
Not this time.
You guessed: Slot 2 holds another number, so look at the next.
What the run did:
Slot 2 is free, so put 23 there.
Question 6 of 10
Not this time.
You guessed: Slot 2 already holds 23, so turn it away.
What the run did:
Slot 2 is free, so put 23 there.