Knuth–Morris–Pratt algorithm: Difference between revisions

Content deleted Content added
Line 409:
'''let''' T[pos] ← cnd
'''let''' cnd ← T[cnd] (to increase performance)
'''while''' cnd >= 0 '''and''' W[pos] <> W[cnd] '''do'''
'''let''' cnd ← T[cnd]
'''let''' pos ← pos + 1, cnd ← cnd + 1