![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C
GJune
这个作者很懒,什么都没留下…
展开
-
小算法--KMP
#include #include #define MAXSTRLEN 255 typedef unsigned char String[MAXSTRLEN + 1]; int main(void) { int Index_KMP(String S, String T, int next[], int pos);//利用模式串T的next求T在主串S中第pos个字符之后的位置的KMP算法原创 2013-03-14 22:57:26 · 551 阅读 · 0 评论 -
小算法--最大子数组
1、Θ(n2)算法 #include typedef struct { int sum; int left; int right; } subarray; int main() { subarray max_subarray_n2(int [], int); int a[] = {13, -3, -25, 20, -3, -16, -23, 18, 20, -7, 12, -5原创 2013-03-17 10:21:35 · 521 阅读 · 0 评论