Knuth–Morris–Pratt algorithm: Difference between revisions

Content deleted Content added
Ryan Reich (talk | contribs)
m A few typographical corrections.
Ryan Reich (talk | contribs)
Another one.
Line 138:
#* If they are equal, set <math>T[i] = j + 1</math>, <math>j = j + 1</math>, and <math>i = i + 1</math>.
#* If not, and if <math>j > 0</math>, set <math>j = T[j - 1]</math>.
#* Otherwise, set <math>T[i] = 0</math>, <math>i = i + 1</math>, <math>j = 0</math>.
# Return to step 3.