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 15 of 51
Question 13 of 47
Step 15 of 51
Step 16 of 51
Step 17 of 51
Step 18 of 51
Step 19 of 51
Step 20 of 51
Step 21 of 51
Question 13 of 47
Question 13 of 47
Right.
You guessed: Another letter is compared here, and it matches the pattern's.
What the run did:
The text's a at position 5 matches the pattern's a.
Question 13 of 47
Not this time.
You guessed: Another letter is compared here, and it is not the pattern's.
What the run did:
The text's a at position 5 matches the pattern's a.
Question 13 of 47
Not this time.
You guessed: No letter is left to compare, so the pattern stands here.
What the run did:
The text's a at position 5 matches the pattern's a.
Question 14 of 47
Question 14 of 47
Right.
You guessed: Another letter is compared here, and it matches the pattern's.
What the run did:
The text's a at position 6 matches the pattern's a.
Question 14 of 47
Not this time.
You guessed: Another letter is compared here, and it is not the pattern's.
What the run did:
The text's a at position 6 matches the pattern's a.
Question 14 of 47
Not this time.
You guessed: No letter is left to compare, so the pattern stands here.
What the run did:
The text's a at position 6 matches the pattern's a.
Question 15 of 47
Question 15 of 47
Not this time.
You guessed: Another letter is compared here, and it matches the pattern's.
What the run did:
Every letter agrees: the pattern stands at place 2. Mark it.
Question 15 of 47
Not this time.
You guessed: Another letter is compared here, and it is not the pattern's.
What the run did:
Every letter agrees: the pattern stands at place 2. Mark it.
Question 15 of 47
Right.
You guessed: No letter is left to compare, so the pattern stands here.
What the run did:
Every letter agrees: the pattern stands at place 2. Mark it.
Question 16 of 47
Question 16 of 47
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 16 of 47
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 16 of 47
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 17 of 47
Question 17 of 47
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 17 of 47
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 18 of 47
Question 18 of 47
Right.
You guessed: Another letter is compared here, and it matches the pattern's.
What the run did:
The text's a at position 3 matches the pattern's a.
Question 18 of 47
Not this time.
You guessed: Another letter is compared here, and it is not the pattern's.
What the run did:
The text's a at position 3 matches the pattern's a.
Question 18 of 47
Not this time.
You guessed: No letter is left to compare, so the pattern stands here.
What the run did:
The text's a at position 3 matches the pattern's a.