guess the next step: Rabin-Karp
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 16
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
Question 1 of 16
Question 1 of 16
Right.
You guessed: The fingerprint here is not the pattern's, so compare no letters.
What the run did:
The fingerprint here is 7, not 0, so these letters cannot be the pattern. Compare none.
Question 1 of 16
Not this time.
You guessed: The fingerprint here is the pattern's, so compare the letters to be sure.
What the run did:
The fingerprint here is 7, not 0, so these letters cannot be the pattern. Compare none.
Question 2 of 16
Question 2 of 16
Not this time.
You guessed: The fingerprint at the next place is 0.
What the run did:
Move the pattern on to place 2. Take k off the front of the fingerprint and add g at the end, giving 2.
Question 2 of 16
Not this time.
You guessed: The fingerprint at the next place is 1.
What the run did:
Move the pattern on to place 2. Take k off the front of the fingerprint and add g at the end, giving 2.
Question 2 of 16
Right.
You guessed: The fingerprint at the next place is 2.
What the run did:
Move the pattern on to place 2. Take k off the front of the fingerprint and add g at the end, giving 2.
Question 3 of 16
Question 3 of 16
Right.
You guessed: The fingerprint here is not the pattern's, so compare no letters.
What the run did:
The fingerprint here is 2, not 0, so these letters cannot be the pattern. Compare none.
Question 3 of 16
Not this time.
You guessed: The fingerprint here is the pattern's, so compare the letters to be sure.
What the run did:
The fingerprint here is 2, not 0, so these letters cannot be the pattern. Compare none.
Question 4 of 16
Question 4 of 16
Right.
You guessed: The fingerprint at the next place is 0.
What the run did:
Move the pattern on to place 3. Take a off the front of the fingerprint and add a at the end, giving 0.
Question 4 of 16
Not this time.
You guessed: The fingerprint at the next place is 1.
What the run did:
Move the pattern on to place 3. Take a off the front of the fingerprint and add a at the end, giving 0.
Question 4 of 16
Not this time.
You guessed: The fingerprint at the next place is 2.
What the run did:
Move the pattern on to place 3. Take a off the front of the fingerprint and add a at the end, giving 0.
Question 5 of 16
Question 5 of 16
Not this time.
You guessed: The fingerprint here is not the pattern's, so compare no letters.
What the run did:
The fingerprint here is 0, the same as the pattern's. Two pieces can share one, so compare the letters to be sure.
Question 5 of 16
Right.
You guessed: The fingerprint here is the pattern's, so compare the letters to be sure.
What the run did:
The fingerprint here is 0, the same as the pattern's. Two pieces can share one, so compare the letters to be sure.
Question 6 of 16
Question 6 of 16
Not this time.
You guessed: Another letter is compared here, and it matches the pattern's.
What the run did:
The text's n at position 3 is not the pattern's r.
Question 6 of 16
Right.
You guessed: Another letter is compared here, and it is not the pattern's.
What the run did:
The text's n at position 3 is not the pattern's r.
Question 6 of 16
Not this time.
You guessed: No letter is left to compare, so the pattern stands here.
What the run did:
The text's n at position 3 is not the pattern's r.