主观

写出向存储结构为邻接矩阵的无向图G中插入一条边(x,y)的算法。算法的头函数为:void AddEdgetoGraph(Graph*G, VertexType X, VertexType y>,无向图G的存储结构为:

#define MaxVertex num

typedef char VertexType;

typedef int EdgeType;

typedef struct graph{

  int n, e;    //图的实际顶点数和边数

  EdgeType edge[MaxVertex][MaxVertex];

  VertexType vertex[MaxVertex];   //顶点表

}Graph;

参考答案
您可能感兴趣的试题
¥

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服