diff --git a/guide/english/algorithms/string-matching-algorithms/kmp-algorithm/index.md b/guide/english/algorithms/string-matching-algorithms/kmp-algorithm/index.md index 4b6682878d..8b11ef9842 100644 --- a/guide/english/algorithms/string-matching-algorithms/kmp-algorithm/index.md +++ b/guide/english/algorithms/string-matching-algorithms/kmp-algorithm/index.md @@ -50,7 +50,7 @@ How to use lps[] to decide next positions (or to know a number of characters to - When we see a **mismatch** - We know that characters pat[0..j-1] match with txt[i-j+1…i-1] (Note that j starts with 0 and increment it only when there is a match). - We also know (from above definition) that lps[j-1] is count of characters of pat[0…j-1] that are both proper prefix and suffix. - - From above two points, we can conclude that we do not need to match these lps[j-1] characters with txt[i-j…i-1] because we know that these characters will anyway match. Let us consider above example to understand this. + - From the above two points, we can conclude that we do not need to match these lps[j-1] characters with txt[i-j…i-1] because we know that these characters will anyway match. Let us consider above example to understand this.
### Code Of KMP Algorithm in C++