摘要: 最朴素的做法o(V*V/2+2E)~O(V^2)#include<iostream>using namespace std;#include<vector>#include<algorithm>#include<string>#include<string.h>const int MAX = 200 阅读全文
posted @ 2016-06-28 22:28 simple_wxl 阅读(204) 评论(0) 推荐(0) 编辑
摘要: KMP的子串长n,模式串长m,复杂度o(m+n),朴素做法的复杂度o((n-m+1)*m) 觉得大话数据结果上面这个讲得特别好 改进版本的KMP leetcode 28. Implement strStr() 28. Implement strStr() 阅读全文
posted @ 2016-06-28 21:18 simple_wxl 阅读(493) 评论(0) 推荐(0) 编辑