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];
}

导航

<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

统计

常用链接

留言簿

文章档案

搜索

最新评论