
KMP
阿阿阿黄
后续文章更新:https://segmentfault.com/u/aaahuang
展开
-
KMP--next数组的理解
刚开始接触这个,网上都说next数组时KMP的精华,很多题都用到了next数组的性质,折腾了一天终于对next数组的来源、作用有了大致了解,看了网上很多讲解,最终在学长发的ppt的过程,茅塞顿开,懂了一丢丢。 1.KMP算法的作用 KMP算法是用来处理字符串匹配的。换句话说,给你两个字符串,你需要回答,B串是否是A串的子串(A串是否包含B串)。例如”Today is Tuesday”.中原创 2015-08-07 21:16:11 · 434 阅读 · 0 评论 -
poj--2406
Power Strings Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 38544 Accepted: 16001 Description Given two strings a and b we define a*b to be their concatenation. For example, if a =原创 2015-09-19 22:01:51 · 343 阅读 · 0 评论 -
Light oj--1258(KMP的变形)
Description A string is said to be a palindrome if it remains same when read backwards. So, 'abba', 'madam' both are palindromes, but 'adam' is not. Now you are given a non-empty string S, contain原创 2015-12-11 21:33:20 · 514 阅读 · 0 评论