二叉树
Miracle_QSH
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
SDUT - 3340 数据结构实验之二叉树一:树的同构
#include <stdio.h>#include <stdlib.h>struct node{ char data; int l, r;}a[15], b[15];int check(int i, int j){ if(a[a[i].l].data == b[b[j].l].data && a[a[i].r].dat...原创 2018-09-05 17:03:04 · 608 阅读 · 0 评论 -
SDUT- 3343 数据结构实验之二叉树四:(先序中序)还原二叉树
#include <stdio.h>#include <string.h>#include <stdlib.h>char a[105], b[105];int n;struct node{ char data; struct node *l, *r;};int max(int a, int b){return a > b ...原创 2018-10-12 20:14:11 · 373 阅读 · 0 评论 -
SDUT- 3344 数据结构实验之二叉树五:层序遍历
#include <stdio.h>#include <string.h>#include <stdlib.h>char a[105];int p, len;struct node{ char data; struct node *l, *r;};struct node *qu[10005];int front = 0, ta...原创 2018-10-12 20:44:40 · 382 阅读 · 0 评论 -
SDUT- 3346 数据结构实验之二叉树七:叶子问题
#include <stdio.h>#include <string.h>#include <stdlib.h>char a[105];int p, len;struct node{ char data; struct node *l, *r;};struct node *qu[10005];int front = 0, ta...原创 2018-10-12 20:48:28 · 263 阅读 · 0 评论 -
SDUT- 3345 数据结构实验之二叉树六:哈夫曼编码
#include <stdio.h>#include <string.h>#include <stdlib.h>int a[10005], p;char data[10005];int vis[10005];void sort(int l, int r){ int i, j; for(i = r - 1; i >= l; i...原创 2018-10-12 21:12:30 · 388 阅读 · 0 评论 -
SDUT - 3342 数据结构实验之二叉树三:统计叶子数
简单写法:#include <stdio.h>#include <stdlib.h>#include <string.h>char a[1005];int main(){ int num, i, len; while(gets(a)) { len = strlen(a); num = 0;...原创 2018-10-09 09:43:06 · 379 阅读 · 0 评论 -
SDUT - 3341 数据结构实验之二叉树二:遍历二叉树
#include <stdio.h>#include <string.h>#include <stdlib.h>char a[105];int p, len;struct node{ char data; struct node *l, *r;};struct node *qu[10005];int front = 0, ta...原创 2018-10-09 09:43:58 · 315 阅读 · 0 评论
分享