The KMP Diagram
The KMP Diagram
Pattern String: “ABABCB”
Get Next
Character
Refers to
Target String
A
B
A
B
C
B
*
s
s
s
s
s
s
s
f
f
f
f
f
f
Following “s” link gets next character
0
1
2
3
4
5
6
7
Previous slide
Next slide
Back to the first slide
View Graphic Version