![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构作业
浅眠流转
这个作者很懒,什么都没留下…
展开
-
数据结构作业——图(拓扑排序,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 · 341 阅读 · 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 · 301 阅读 · 0 评论