图的存储结构(邻接矩阵,邻接表)
作者:互联网
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
//邻接矩阵
#define Max_Size 100
typedef int VertexType;
typedef int EdgeType;
typdef struct
{
VertexType vert[Max_Size];
EdgeType edge[Max_Size][Max_Size];
int n, e;
} MGraph;
//邻接表
#define max_size 100
typedef struct ArcNode
{
int data;
struct ArcNode *next;
} ArcNode;
typedef struct Vertxt
{
int Ver;
ArcNode *first;
} VertxtList[max_size];
typdef struct
{
VertxtList myVer;
int n, e;
} MGRAPH;
标签:存储,struct,int,Max,typedef,邻接矩阵,ArcNode,邻接,include 来源: https://blog.csdn.net/qq_25233621/article/details/114527265