字符串算法小结
摘要:KMP 字符串单模匹配算法。 $S$是模板串,$T$是文本串,$next(i)$表示字符串$T[1...i]$的所有后缀中还是$T$的前缀的最长的长度,失配时利用$next(i)$转移即可。 时间复杂度为均摊$O(|S|+|T|)$。 Manacher 求一个字符串的所有回文子串。 记$maxrig
阅读全文
posted @ 2019-06-25 18:17
posted @ 2019-06-25 18:17
posted @ 2019-04-08 10:11
posted @ 2019-02-27 22:27
posted @ 2019-01-11 16:18
posted @ 2018-12-14 00:36