
数据结构作业
浅眠流转
这个作者很懒,什么都没留下…
展开
-
数据结构作业——图(拓扑排序,DFS深度遍历,BFS广度遍历)
数据结构作业——图 要求 1,创建有向图 2,输出拓扑排序 3,输出深度遍历次序 4,输出广度遍历次序 #include<bits/stdc++.h> using namespace std; const int maxn=1e5+10; int in[maxn]; int f[maxn]; //队列 typedef struct qnode{ int x; struct qno...原创 2019-12-10 12:55:14 · 382 阅读 · 0 评论 -
数据结构作业——二叉树(非递归遍历及其相关功能)
数据结构作业——二叉树 要求 1,创建一个二叉树 2,非递归遍历二叉树先序遍历,后序,中序 3,统计树的高度 4,统计树的度 5,销毁树 代码 #include<bits/stdc++.h> using namespace std; int Num_0,Num_1,Num_2; int high=0; //二叉树 typedef struct tree{ char x; tree...原创 2019-12-10 12:52:11 · 387 阅读 · 0 评论