Computer scienceAlgorithms and Data StructuresAlgorithmsString algorithmsSubstring search algorithms

Knuth-Morris-Pratt algorithm

Mismatched symbols

Report a typo

Consider the following step of the KMP algorithm:

Here, we have a mismatch: t[9]s[8]t[9] \ne s[8]. Before a new iteration, we need to shift the pattern by xx symbols. What is xx equal to?

Enter a number
___

Create a free account to access the full topic