We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb95569 commit 6422cc2Copy full SHA for 6422cc2
1 file changed
README.md
@@ -682,23 +682,23 @@ Which can be summarized with the following table:
682
683
#### How KMP uses the suffix-oriented table
684
685
-During search, if you have matched `j` characters and then get a mismatch:
+Assume that `j` characters have been matched, and then a mismatch occurs.
686
687
-Instead of:
+Instead of the following:
688
689
```text
690
textIndex = textIndex - j + 1
691
692
j = 0
693
```
694
695
-You do:
+We can simply do:
696
697
698
j = kmpBorders[j - 1]
699
700
701
-And continue from the already-known partial match.
+This allows continuation from the already-known partial match.
702
703
This is what gives KMP its linear time, since each character in the text is processed at most once.
704
0 commit comments