
KMP
zhi_tong
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Oulipo
The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book: Tout avait Pair normal, mais tout s’a...原创 2018-03-14 20:35:28 · 1295 阅读 · 0 评论 -
Cyclic Nacklace
CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 yuan left. he is too distressed and thinking about how to...原创 2018-04-13 23:38:40 · 211 阅读 · 0 评论 -
扩展KMP算法
摘自:https://segmentfault.com/a/1190000008663857 问题定义:给定两个字符串S和T(长度分别为n和m),下标从0开始,定义extend[i]等于S[i]...S[n-1]与T的最长相同前缀的长度,求出所有的extend[i]。举个例子,看下表: i 0 1 2 3 4 5 6 7 S a ...转载 2018-09-14 19:14:03 · 231 阅读 · 0 评论 -
String提取指定分隔符的字符串到vector
例:提取在字符'/'之间的字符串 如: /articles/2003/ /articles/<int>/ /articles/<int>/<int>/ /articles/<int>/<int>/<str>/ /static/<path> 方法一:使用string的find函数和substr函数来提取...原创 2018-10-12 17:23:10 · 1876 阅读 · 0 评论