邻接矩阵建立无向图并广度遍历.pdfVIP

  • 0
  • 0
  • 约3.35千字
  • 约 8页
  • 2022-07-07 发布于安徽
  • 举报
邻接矩阵建立无向图并广度遍历 #includestdio.h #includealloc.h #includeiostream using namespace std; #define M 10 #define MAX 100 typedef struct node { int adjvex; struct node *next; }JD; typedef struct tnode{ int vexdata; struct node *firstare; }TD; typedef struct{ int data; int jihe; }VEX; typedef struct{ int vexh,vext; int weight; int flag; }EDGE; void minitree_KRUSKAL(void){ int n,i,m,min,k,j; VEX t[M]; EDGE e[M]; printf(input the number of vertex and edge:); scanf(%d,%d,n,m); for(i=1;i=n;i++){ printf(t[%d].data=:,i); scanf(%d,t[i].data); t[i].jihe=

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档