We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a788ba commit 1d28138Copy full SHA for 1d28138
src/build.js
@@ -2,6 +2,11 @@
2
* Computes for each j the largest 0 <= i < j such that
3
* p.slice(0, i) is p.slice(j-i, j).
4
*
5
+ * This is the "f[j]" table found in
6
+ * "Fast pattern matching in strings" by Knuth, Morris, and Pratt,
7
+ * although here indices are 0-based hence all indices and inputs are one less
8
+ * than in that paper.
9
+ *
10
* @param {ArrayLike} p
11
* @param {number} pi
12
* @param {number} pj
0 commit comments