Skip to content

Commit ff73247

Browse files
author
Raghav Dua
committed
minor correction: deleted redundant code
1 parent dc5eb0e commit ff73247

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

algorithm/string/knuth_morris_pratt/substring_search/code.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ Number.prototype.mod = function (n) {
33
return ((this%n)+n)%n;
44
};
55

6-
function randString (length) {
7-
var result = Math.random ().toString (36);
8-
return result.substring (result.length - length);
9-
}
10-
116
function tracker (substring) {
127
var i = 1, j = 0;
138

@@ -110,4 +105,4 @@ var positions = kmp (string, substring);
110105
logger._print ('Substring positions are: ' + (positions.length ? String (positions) : 'NONE'));
111106
for (var i = 0; i < positions.length; i++) {
112107
stringTracer._select (positions [i], positions [i] + substring.length - 1)._wait ();
113-
}
108+
}

0 commit comments

Comments
 (0)