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年2月>
2627282930311
2345678
9101112131415
16171819202122
2324252627281
2345678

统计

常用链接

留言簿

文章档案

搜索

最新评论