摘要:
kmp算法的最难理解的是next数组的生成,next数组存储的是匹配子串数组前缀与后缀相同长度。该next数组长度为字符串+1,next[0] = -1。 例题: hdu2203 #include<iostream> #include<cstdio> #include<cstring> #inclu 阅读全文
posted @ 2017-09-19 10:57
君凌烟阁
阅读(285)
评论(0)
推荐(0)
2017年9月19日