文件名称:graphoperation
介绍说明--下载内容均来自于网络,请自行研究使用
根据从键盘输入的数据创建图(图的存储结构可采用邻接矩阵或邻接表),并对图进行深度优先搜索和广度优先搜索(实验类型:验证型)
1)问题描述:在主程序中提供下列菜单:
1…图的建立
2…深度优先遍历图
3…广度优先遍历图
0…结束
2)实验要求:图的存储可采用邻接表或邻接矩阵;定义下列过程:
CreateGraph(): 按从键盘的数据建立图
DFSGrahp():深度优先遍历图
BFSGrahp():广度优先遍历图-According to data from the keyboard to create (Fig. storage structure can be the adjacency matrix or adjacency list), and the graph depth-first search and breadth-first search (the type of experiment: validation type) 1) Problem Descr iption: In the main program to provide The following menu: 1 ... 2 ... diagrams of depth-first traversal breadth-first traversal Figure 3 ... 0 ... the end of Figure 2) experimental requirements: graph adjacency list can be stored or adjacency matrix define the following procedure: CreateGraph (): press from the keyboard The data set Figure DFSGrahp (): depth-first traversal Figure BFSGrahp (): breadth-first traversal graph
1)问题描述:在主程序中提供下列菜单:
1…图的建立
2…深度优先遍历图
3…广度优先遍历图
0…结束
2)实验要求:图的存储可采用邻接表或邻接矩阵;定义下列过程:
CreateGraph(): 按从键盘的数据建立图
DFSGrahp():深度优先遍历图
BFSGrahp():广度优先遍历图-According to data from the keyboard to create (Fig. storage structure can be the adjacency matrix or adjacency list), and the graph depth-first search and breadth-first search (the type of experiment: validation type) 1) Problem Descr iption: In the main program to provide The following menu: 1 ... 2 ... diagrams of depth-first traversal breadth-first traversal Figure 3 ... 0 ... the end of Figure 2) experimental requirements: graph adjacency list can be stored or adjacency matrix define the following procedure: CreateGraph (): press from the keyboard The data set Figure DFSGrahp (): depth-first traversal Figure BFSGrahp (): breadth-first traversal graph
(系统自动生成,下载前可以参看下载内容)
下载文件列表
图的程序.c