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年5月>
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

统计

常用链接

留言簿

文章档案

搜索

最新评论