摘要: KMP算法主要工作是计算next数组(这里我们认为数组从0开始) 模式字符串为m,伪代码如下: void Next(m,next){ int i=0,j=-1; next[0]=-1; while(i<strlen(m)) { if(j 1||m[i]==m[j]) { i++; j++; next 阅读全文
posted @ 2020-03-15 23:56 kakusan 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 1 #include<stdio.h> 2 float a[10]; 3 float *p; 4 int main() 5 { 6 void input(float*,int); 7 void output(float*,int); 8 void change(float*,int); 9 p=a; 阅读全文
posted @ 2020-03-15 16:43 kakusan 阅读(893) 评论(0) 推荐(0) 编辑