KMP
杨明诚
明则诚矣,诚则明矣
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Number Sequence
Number Sequence Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which make a[K原创 2017-08-15 20:32:39 · 702 阅读 · 0 评论 -
Kmp算法
设主串(下文中我们称作T)为:a b a b b a b a b a d a b a b a a a b a b a a 模式串(下文中我们称作S)为:a b a b a a a b a b a a nest[i] : -1 0 0 1 2 3 1 1 2 3 4 5 三个数组我们都从1开始,到他们的长度。 当用暴力的算法时,我们会把T[1]与S[1]比较知道T[4]时不再匹原创 2017-08-16 09:58:27 · 319 阅读 · 0 评论
分享