Failure Function Sprint KMP · ALG 13.2

Fill in the failure array Z of the needle ι: Z[i] = the length of the longest proper suffix of ι[:i] that is also a prefix of ι. (Z[1] = 0 is given.) Type a number or click it.

time –
score 0
streak 0
best sprint 0

Pick a level and press sprint or practice.

Hint: Z[i] ≤ Z[i−1] + 1. Why? And how does KmpBuild use this?

← ADS2 Arcade