re: KMP算法 lstar 2011-04-21 10:55
楼主这里有问题吧,
while(j<strlen(s2))
{
//临界条件 j=strlen(s2) -1;
if(i==-1||s2[i]==s2[j]){
i++; j++;
// j++后 j=strlen(s2);
//next[j] 数组越界了?
next[j]=i;
}
else i=next[i];
}

导航

<2025年4月>
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

统计

常用链接

留言簿

文章档案

搜索

最新评论