会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
泰戈尔写诗
博客园
首页
新随笔
联系
订阅
管理
2021年1月7日
数据结构备考
摘要: #include <bits/stdc++.h> void getNext(int m) { next[0] = -1; int i = 0, j = -1; while (i < m) { if (j == -1 || p[i] == p[j]) p[i] = j; else j = next[j
阅读全文
posted @ 2021-01-07 08:12 代码画师
阅读(52)
评论(0)
推荐(0)
2020年11月30日
2020年11月30号图论代码
摘要: A - 数据结构实验之图论一:基于邻接矩阵的广度优先搜索遍历 #include <iostream> #include <bits/stdc++.h> using namespace std; bool Map[105][105],vis[105]; void bfs(int k,int t) {
阅读全文
posted @ 2020-11-30 18:42 代码画师
阅读(74)
评论(0)
推荐(0)
2020年11月22日
二叉树
摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> int n; struct node { char data; node *left,*right; }; node *createTree1(char a[]) { node ro
阅读全文
posted @ 2020-11-22 22:58 代码画师
阅读(88)
评论(0)
推荐(0)
2020年11月17日
树(中)笔记
摘要: 层序遍历 void LevelOrderTraversal(BinTree BT) { Queue Q; BinTree T; if(!BT)return; Q=CreateQueue(); AddQ(Q,BT); while(!IsEmpty(Q)) { T=DeleteQ(Q); printf(
阅读全文
posted @ 2020-11-17 23:30 代码画师
阅读(62)
评论(0)
推荐(0)
二叉树的遍历
摘要: void InorderTraversal( BinTree BT ) { if( BT ) { InorderTraversal( BT->Left ); /* 此处假设对BT结点的访问就是打印数据 / printf("%d ", BT->Data); / 假设数据为整型 */ InorderTr
阅读全文
posted @ 2020-11-17 22:10 代码画师
阅读(89)
评论(0)
推荐(0)
2020年11月14日
二分查找
摘要: #include <stdio.h> #include <stdlib.h> #define MAXSIZE 105 int Binary_Search(int a[],int x,int left,int right) { if(left>right)return; int mid=(left+r
阅读全文
posted @ 2020-11-14 15:53 代码画师
阅读(72)
评论(0)
推荐(0)
2020年10月28日
串函数
摘要: strlen strcpy strcmp strcat strchr strstr int strlen(const char s) { int cnt=0; while(s[cnt]!='\0')cnt++; return cnt; } int strcmp(const char *s1,cons
阅读全文
posted @ 2020-10-28 22:20 代码画师
阅读(84)
评论(0)
推荐(0)
2020年9月21日
很有意思的一天
摘要: 万金生 计科1904 111 222 333 本文引用书籍: 《万金生》 #include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a >> b; cout << a + b; return 0; } 某个
阅读全文
posted @ 2020-09-21 23:25 代码画师
阅读(104)
评论(0)
推荐(0)
2020年8月14日
常用函数
摘要: 1.求组合数函数(函数嵌套) 1 double cmn(int m,int n) // 定义cmn()函数求组合数 2 { 3 double res; 4 res=fac(m)/(fac(n)*fac(m-n)); // 调用fac()函数 5 return res; 6 } 7 double fa
阅读全文
posted @ 2020-08-14 15:50 代码画师
阅读(139)
评论(0)
推荐(0)
计算机英语
摘要: 1.四则运算:add substract multiply devide factorial ( 阶乘 ) 2.
阅读全文
posted @ 2020-08-14 15:44 代码画师
阅读(112)
评论(0)
推荐(0)
下一页
公告