C++ DFS BFS
来源:互联网 发布:app store 软件 发票 编辑:程序博客网 时间:2024/05/18 03:50
#include <iostream>#define MaxVertices 8using namespace std;struct EdgeNode{ int adjvex; int weight; EdgeNode *next;};class Graph{private: EdgeNode *GL[MaxVertices]; int numberVertices;public: Graph():numberVertices(0){ for(int i=0;i<MaxVertices;i++) GL[i]=NULL;} void CreateEdge(int k1,int k2); void CreateVertices(int n); void dfsAdjoin(int i,bool* visited); void dfsTraverse(); void bfsAdjoin(int i,bool* visited); void bfsTraverse();};void Graph:: CreateVertices(int k1,int k2){ char c1,c2,c3; int i,j; int w; EdgeNode* p; cout<<"请输入边形式为{(),()}"; cin>>c1; if(k2==0) { }}int main(){}
阅读全文
0 0
- c++:DFS与BFS详解
- C++--图算法之DFS,BFS,Dijstra
- 图bfs和dfs遍历 c语言版
- BFS-DFS
- BFS DFS
- DFS+BFS
- BFS DFS
- DFS BFS
- DFS & BFS
- BFS,DFS
- dfs bfs
- BFS&DFS
- DFS BFS
- BFS && DFS
- BFS DFS
- DFS & BFS
- DFS&BFS
- BFS&DFS
- leetcode题解-84.Largest Rectangle in Histogram
- 一步步教你Hadoop多节点集群安装配置
- 异常
- 如何在keystone项目中编写API文档
- 购物(DP/贪心)
- C++ DFS BFS
- JS 对中文进行转码防止乱码
- List接口
- DeptExample(entity)
- 1到10,20到30,30到45求和
- kettle 为转换增加日志表
- leetcode 118[easy]---Pascal's Triangle
- Emp(entity)
- Git bash中自带的SSH服务