搜索资源列表
code
- 以邻接多重表为存储结构,实现连通无向图的深度优先和广度优先遍历。以用户指定的结点为起点,分别输出每种遍历下的结点访问序列和相应生成树的边集。-To the adjacent multi-sheet for the storage structure, to achieve connected undirected graph depth-first and breadth-first traversal. To user-specified node as a starting point, r
Graph
- 输入一个带权无向图的顶点数、边数、各条边信息(两个顶点和权值),建立该图的邻接矩阵结构,输出该邻接矩阵。将上述无向图邻接矩阵转换为邻接表结构,输出该邻接表;根据该邻接表对无向图进行深度优先遍历序列和广度优先遍历序列,并输出遍历结果;用prim算法实现构造该带权无向图的最小生成树,并将该最小生成树的各条边信息输出。-Enter a weighted undirected graph with vertices, edges, each of the side information (two ve