KMP算法过程分析演示PPT(英文版).pptVIP

  • 32
  • 0
  • 约4.2千字
  • 约 35页
  • 2021-05-05 发布于广东
  • 举报
Next Table: (this example) How to build? Next = short string = 2+1 1+1 0+1 0+1 List each preceding subsequence. For each case, we try to find the longest subsequence from back to front, which is equal but not same to that we find from front to back . Then the length of the longest subsequence will generate the next index. Another example: Next = short string = 0+1 0+1 1+1 1+1 2+1 3+1 KMP Algorithm : In long string: KMP don’t need to reset the index in long str ,when an iteration ends. It can keep going and never go back. In short string: which index KMP wi

文档评论(0)

1亿VIP精品文档

相关文档