谁会数据结构?用邻接表创建一个<无向图>,中间涉及到“狐头”“狐尾”吗?我个人认为不应该涉及到>voidCreateGraph(AdjGraph*G)/*采用邻接表存储结构,创建无向图G*/、----
2023-04-27
问题描述:
谁会数据结构?用邻接表创建一个 < 无向图>,中间涉及到“狐头”“狐尾”吗?我个人认为不应该涉及到>void CreateGraph(AdjGraph *G)
/*采用邻接表存储结构,创建无向图G*/ 、-----------《它注明是创建无向图》
{
\x05int i,j,k;
\x05VertexType v1,v2;\x05\x05
.(中间省略)
\x05scanf("%s%s",v1,v2);
\x05\x05i=LocateVertex(*G,v1);
\x05\x05j=LocateVertex(*G,v2);
\x05\x05/*j为弧头i为弧尾创建邻接表*/----------中间为什么涉及弧头弧尾?
\x05\x05p=(ArcNode*)malloc(sizeof(ArcNode));
\x05\x05p->adjvex=j;
\x05\x05p->info=NULL;
\x05\x05p->nextarc=G->vertex[i].firstarc;
\x05\x05G->vertex[i].firstarc=p;
\x05\x05/*i为弧头j为弧尾创建邻接表*/------中间问什么涉及弧头弧尾?
最佳答案:
用邻接表创建一个 < 无向图>,是不会涉及到弧头弧尾的,只有边邻接的两个顶点
![]( //img1.runjiapp.com/duoteimg/tiku/images/pc/questionBank/main-list-title-icon.png)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_27.jpg)
![](https://img1.runjiapp.com/duoteimg/tiku/imgs/34fae6cd7b899e5165da77a041a7d933c8950d29.png)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_53.jpg)
2023-04-27
初高中化学
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_15.jpg)
所有的偶数都可以表示成2n(n为整数),则(2n-1)表示什么实际意义?
2023-04-27
初高中化学
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_77.jpg)
2023-04-27
初高中化学
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_9.jpg)
2023-04-27
初高中化学
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_41.jpg)
2023-04-27
初高中化学
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_38.jpg)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_41.jpg)
英语翻译大冶市三进进出口贸易有限公司,地址:大冶市观山小区12号
2023-04-27
初高中化学
热门标签