KMP 算法使用 nextval 数组进行模式匹配,模式串为 S=‘ababaaa’, 当主串中的某 个字符与 S 中的第6个字符失配时, S向右滑动的距离是()。
A. 1 B.2 C.3 D.4
[tag_link]
正确答案:B