#include <iostream>
using namespace std;
const int N = 105;
struct ArcNode { // 边结点
int adjvex;
Node* next;
};
struct VNode { // 顶点
int data; // 顶点信息
ArcNode *head1; // 出边表的表头指针
//ArcNode *head2; // 入 - 一般不用 - 逆邻接表用的把!
};
struct LGraph {
VNode vertexs[N]; // 顶点数组 (0, 1, 2)
int vexnum, arcnum;
};
LGraph lg; // 图 (邻接表存储)
int main() {
return 0;
}邻接表初步
最新推荐文章于 2025-11-25 16:50:45 发布
本文详细介绍了使用邻接表存储图的基本实现过程,包括图的定义、节点结构、图结构以及图的基本操作,旨在为初学者提供清晰的图论基础知识。
919

被折叠的 条评论
为什么被折叠?



