无向图的深度优先生成树

用邻接表存储的无向图的深度优先生成树,树结点用孩子兄弟结构保存。下面是代码 #include<iostream> #include<string> using namespace std; #define MAX_VERTEX_NUM 20 bool visited[20];//用于遍历时辅助使用 bool searched[20];//用于建树时辅助使用 //循环队列模版 template<cl
相关文章
相关标签/搜索