摘要: //深度优先遍历图返回连通分量数-int dfstraverse(LinkedGraph q){ int i,count=0; for(i=0;iCASE[%d]:\n",count); count++; dfs(q,i); } ... 阅读全文
posted @ 2015-02-05 10:56 Thereisnospon 阅读(470) 评论(0) 推荐(0) 编辑
摘要: #include#include#define M 20typedef char type;typedef struct node//边表节点(边){ int adjvex;//邻接点 struct node *next;}EdgeNode;typedef struct vnode//头... 阅读全文
posted @ 2015-02-05 10:55 Thereisnospon 阅读(296) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#define FINITY 50000#define M 20typedef char vertextype;typedef int edgetype;typedef struct{ vertextype vexs[M];//定点信息 e... 阅读全文
posted @ 2015-02-05 10:53 Thereisnospon 阅读(212) 评论(0) 推荐(0) 编辑
摘要: #include"ljjz.h"typedef struct edgedata{ int beg; int end; int length;}edge;void QuickSort(edge edges[],int left,int right)//按边的权值进行快排{ ed... 阅读全文
posted @ 2015-02-05 10:52 Thereisnospon 阅读(169) 评论(0) 推荐(0) 编辑