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 dc5eb0e commit ff73247Copy full SHA for ff73247
algorithm/string/knuth_morris_pratt/substring_search/code.js
@@ -3,11 +3,6 @@ Number.prototype.mod = function (n) {
3
return ((this%n)+n)%n;
4
};
5
6
-function randString (length) {
7
- var result = Math.random ().toString (36);
8
- return result.substring (result.length - length);
9
-}
10
-
11
function tracker (substring) {
12
var i = 1, j = 0;
13
@@ -110,4 +105,4 @@ var positions = kmp (string, substring);
110
105
logger._print ('Substring positions are: ' + (positions.length ? String (positions) : 'NONE'));
111
106
for (var i = 0; i < positions.length; i++) {
112
107
stringTracer._select (positions [i], positions [i] + substring.length - 1)._wait ();
113
108
+}
0 commit comments