Skip to content

Commit 401f3f1

Browse files
committed
Fix bug in KMP
1 parent e817fbc commit 401f3f1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎src/searching/knuth-morris-pratt.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
j = table[j - 1];
6666
} else {
6767
i += 1;
68+
j = 0;
6869
}
6970
}
7071
}

0 commit comments

Comments
 (0)