失效(失配)函数:
P: s h e s h e l l s
F: -1 0 0 0 0 1 2 3 0 0
P: s h e s e l l s s h e l l s
F: -1 0 0 0 0 1 0 0 0 1 0 1 2 3 0 0
P: a a a a a a a a
F: -1 0 1 2 3 4 5 6
P: a b c d a b c d a b c d e f g
F: -1 0 0 0 0 1 2 3 4 5 6 7 8 0 0
失效(失配)函数:
P: s h e s h e l l s
F: -1 0 0 0 0 1 2 3 0 0
P: s h e s e l l s s h e l l s
F: -1 0 0 0 0 1 0 0 0 1 0 1 2 3 0 0
P: a a a a a a a a
F: -1 0 1 2 3 4 5 6
P: a b c d a b c d a b c d e f g
F: -1 0 0 0 0 1 2 3 4 5 6 7 8 0 0
本文标题:KMP算法
本文链接:https://www.haomeiwen.com/subject/olfcqqtx.html
网友评论