guess the next step: Knuth-Morris-Pratt
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 18 of 22
Question 13 of 15
Step 18 of 22
Step 19 of 22
Step 20 of 22
Step 21 of 22
Question 13 of 15
Question 13 of 15
Right.
You guessed: Another letter is compared here, and it matches the pattern's.
What the run did:
The text's b at position 6 matches the pattern's b.
Question 13 of 15
Not this time.
You guessed: Another letter is compared here, and it is not the pattern's.
What the run did:
The text's b at position 6 matches the pattern's b.
Question 13 of 15
Not this time.
You guessed: No letter is left to compare, so the pattern stands here.
What the run did:
The text's b at position 6 matches the pattern's b.
Question 14 of 15
Question 14 of 15
Right.
You guessed: Another letter is compared here, and it matches the pattern's.
What the run did:
The text's c at position 7 matches the pattern's c.
Question 14 of 15
Not this time.
You guessed: Another letter is compared here, and it is not the pattern's.
What the run did:
The text's c at position 7 matches the pattern's c.
Question 14 of 15
Not this time.
You guessed: No letter is left to compare, so the pattern stands here.
What the run did:
The text's c at position 7 matches the pattern's c.
Question 15 of 15
Question 15 of 15
Not this time.
You guessed: Another letter is compared here, and it matches the pattern's.
What the run did:
Every letter matched: the pattern stands at place 3. Mark it.
That is every question on this run: 0 of 15 right.
Question 15 of 15
Not this time.
You guessed: Another letter is compared here, and it is not the pattern's.
What the run did:
Every letter matched: the pattern stands at place 3. Mark it.
That is every question on this run: 0 of 15 right.
Question 15 of 15
Right.
You guessed: No letter is left to compare, so the pattern stands here.
What the run did:
Every letter matched: the pattern stands at place 3. Mark it.
That is every question on this run: 1 of 15 right.