KMP Algorithm · Pattern Matching
unseel.com · O(n + m) · prefix function · linear time
i (text) 0
j (pattern) 0
State
Idle
Comparing
Match
Mismatch · fall back
Unseel.com · KMP Algorithm