Content deleted Content added
Fixed an error in the algorithm so that sj begins with the 1st character, not the 0th. Also clarified an if statement since one of it's arguments is always true if the other is true. |
|||
Line 38:
<source lang="Python">
def
S += S # Concatenate string to it self to avoid modular arithmetic
f = [-1] * len(S) # Failure function
|