
KMP
fsqfang
这个作者很懒,什么都没留下…
展开
-
poj 2752
Seek the Name, Seek the Fame Description The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies. The原创 2014-12-02 16:33:44 · 360 阅读 · 0 评论 -
poj Power Strings
Power Strings Description Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplica原创 2014-12-02 13:22:02 · 714 阅读 · 0 评论 -
poj 1961 Priod
Period Description For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the prefix is a periodic string.原创 2014-12-02 13:52:23 · 431 阅读 · 0 评论 -
KMP
KMP算法小结: 最重要的就是神奇的next[]数组; 1) 利用next[]数组可以求得一个字符串中某个子串的重复次数k,k = len %(len - next[len]); 2) 求一个即是字符串前缀也是后缀的子串即子串的个数;原创 2014-12-02 16:47:58 · 275 阅读 · 0 评论