摘要: 一、链表。 功能:插入,删除,遍历。 1 struct node 2 { 3 int value,next; 4 }arr[MAXN]; 5 int top; 6 void insert(int p,int q) 7 { 8 arr[++top].value=q; 9 arr[top].next=a 阅读全文
posted @ 2016-09-03 22:12 chty 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 1、图的储存方式 (1)邻接矩阵。 用map[i][j]表示i、j两点是否联通。 (2)邻接表。 1 struct node{int y,next,v;}e[MAXN]; 2 int len,Link[MAXN]; 3 void insert(int x,int y,int z) 4 { 5 e[+ 阅读全文
posted @ 2016-09-03 22:08 chty 阅读(413) 评论(0) 推荐(0) 编辑