Skip to content

Commit 2bdaf6d

Browse files
committed
KMP algorithm
1 parent 787198c commit 2bdaf6d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

kmp.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#Knuth–Morris–Pratt algorithm (KMP) algorithm, http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm
2-
32
def kmp str, ptrn
43
m = i = 0
54
t = compute_table ptrn

0 commit comments

Comments
 (0)