Setting The Fail Links
Setting The Fail Links
fail[1] := 0;
For k := 2 to P.length Do
r := fail[k-1];
While r > 0 And P[r] ¹ P[k-1] Do
r := fail[r];
End While;
fail[k] := k+1;
End For
Previous slide
Next slide
Back to the first slide
View Graphic Version