假设你还不知道邻接表的概念和作用etc:
请猛戳:http://baike.baidu.com/view/549594.htm?fr=aladdin
struct Edge { int v; int next; }e[maxm]; memset(head,-1;sizeof(head); int c = 0; void add(int x, int y) { e[c].v = y; e[c].next = head[x]; head[x] = c++; }
图的邻接表存储 c实现:http://blog.csdn.net/linxinyuluo/article/details/6847851
图---邻接表(建立。深度遍历,广度遍历):http://blog.csdn.net/akof1314/article/details/4388722
邻接表全面解说代码:http://www.cnblogs.com/mycapple/archive/2012/08/03/2620938.html
图的存储结构(邻接表)_这里的小助手很有意思:http://blog.fishc.com/2523.html
时间: 2024-11-04 22:12:13