
算法
nyq0321
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
kmp
#define _CRT_SECURE_NO_WARNINGS #include using namespace std; void compute_prefix(char* p, int* next) { next[0] = next[1] = 0; for (int i = 2,k = 0;i { for (;k != 0 && p[k] != p[i - 1原创 2017-05-03 16:48:43 · 203 阅读 · 0 评论 -
大数加法
#include #include using namespace std; const int MAXN = 1000; int a[MAXN] = { 0 }; int b[MAXN] = { 0 }; int main() { string str1, str2; cin >> str1 >> str2; long int len1, len2; in原创 2017-05-03 16:47:08 · 269 阅读 · 0 评论 -
二叉树初始化
#include #include using namespace std; /*class TreeNode { public: int val; TreeNode* left; TreeNode* right; TreeNode(int val) { this->val = val; this->left = NULL; this->right = NULL;原创 2017-05-04 00:02:10 · 8329 阅读 · 0 评论