开发者

Understanding Boyer-Moore string search algorithm's "Good Suffix Shift"-Table

Please help me to understand Boyer-Moore string search algorithm's "Good Suffix Shift"-Table.

What has happened when i==3?

There is no sub-string "_MAN" in the pattern. So the shift value should be 8 (as it was when i==1).

Why is it 开发者_如何学运维6?


There is no sub-string "_MAN", but the string does start with "AN", so if you shift over by 6 you could get a pattern that matches as follows

_ M A N _ _ _ _ _ _
_ _ A N P A N M A N
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜