1. 图的顺序存储
//邻接矩阵
#define MaxVerterNum 100
typedef char VerterType;
typedef int EdgeType;
typedef struct
{
VerterType vexs[MaxVerterNum]; //存储顶点的一维数组
EdeType edges[MaxVerterNum][MaxVerterNum];
int n, e; //图当前的顶点数和边数
}MGragh;
void CreateMGragh(MGragh *G) //时间复杂度O(n^2)
{
int i, j, k, w;
scanf ("%d%d, &G->n, &G->e"); //读入顶点数和边数
for (i = 0; i < G->n; i++) //读入顶点信息,建立顶点表
G->vexs[i] = getchar();
for (i = 0; i < G->n; i++) //邻接矩阵初始化
for (j = 0; i < G->n; j++)
G->edges[i][j] = 0;
for (k = 0; k < G->e; k