最小生成树的概念: 最小生成树是基于“带权图” 的,即图中每条边上都有特定的权值,这样的图又称为网。最小生成树指的是所有生成树中,权值之和最小的树。 Prim算法: ...
最小生成树的概念: 最小生成树是基于“带权图” 的,即图中每条边上都有特定的权值,这样的图又称为网。最小生成树指的是所有生成树中,权值之和最小的树。 Prim算法: ...
// // main.cpp // Grpah_DFS_BFS // // Created by duanqibo on 2019/7/3. // Copyright © 20 ...
源程序: /*无向带权图的邻接矩阵表示法*/#include <stdio.h>#define vnum 20const int MAX_INT=0;typedef struct gp{ ...
// main.cpp // stack_quhao // Created by duanqibo on 2019/6/29. // Copyright © 2019年 duanqibo. ...
源代码 #include <stdio.h>#include <stdlib.h>#include <malloc.h>#define MAXSIZE 100 ...
源程序: #include <stdio.h> #include <stdlib.h> //二叉排序树节点描述 typedef int DataType; t ...
源程序: // // main.cpp // bitree // // Created by duanqibo on 2019/11/25. // Copyright © 2019 ...
源代码: #include <stdio.h>#include <stdlib.h> typedef struct tnode{ int id; int score ...
//设立一个队列Q,用于存放结点,以保证二叉树结点按照层次顺序从左到右进入队列。若二叉树bt非空,首先,//将根结点插入队列,然后,从队列中删除一个结点,访问该结点,并将该结点的孩子结点(如果有的话) ...
源程序: #include <stdio.h> #include <stdlib.h> #define MAXSIZE 9 /* 存储空间初始分配量 */ ...