问一道数据结构 求无向图和邻接表的习题答:设无向图有6个节点,依次输入的9条边为(1,2)(1,3)(1,5)(1,6)(2,3)(3,4)(3,5)(4,5)(5,6).1.画出... 麻烦老师讲解一下 ,万分感谢!!!设无向图有6个节点,依次输入的9条边为(1,2)(1,3)(1,5)(1,6)(2,3)(3,4)(3,5)(4,5)(5,6).1.画出无向图G。2.画出G的邻接表 ...
实现用邻接表创建无向图,判断输入的图是不是连通图。用C++答://n个点m条边,输出连通1,否则0 include<cstdio> include<iostream> include<string> include<cstring> include<algorithm> using namespace std;struct unit {int u,v,next;};struct unit e[400010];struct unit2 {int dfn,low;};struct unit2 b[100010];int n,m,num=0,order=0,g=0,top...