什么是图结构:

图的基本概念:

代码实现准备数据:


代码实现:
/**
* @PackageName:
* @author:
* @date:2022/7/30
*/
public class ChartTable {
static Scanner input = new Scanner(System.in);
//创建邻接矩阵
static void CreateGraph(GraphMatrix GM){
int i,j,k;
//权
int weight;
//边的起始顶点
char EstartV,EendV;
System.out.println("输入图中各顶点信息");
for (i=0;i%c",GM.Vertex[n]);
//添加处理节点的操作
for (i=0;i