打赏

图数据结构——邻接表

#define MaxVertexNum 100
typedef struct ArcNode(    //边表节点
    int adjvex;
    struct ArcNode *next;
}ArcNode;

typedef struct VNode{    //顶点表节点
    VertexType data;
    ArcNode *first;
}VNode, AdjList[MaxVertexNum];
    
typedef struct{
    AdjList vertices;    //邻接表
    int vexunm, arcnum;
}ALGraph;

 

posted @ 2022-02-04 19:35  不像话  阅读(21)  评论(0编辑  收藏  举报