当前位置:网站首页>Data Organization---Chapter 6 Diagram---Graph Traversal---Multiple Choice Questions
Data Organization---Chapter 6 Diagram---Graph Traversal---Multiple Choice Questions
2022-08-02 14:01:00 【A life without a root, gone with the wind, such as dust on the 】
1What is the single-source shortest path problem
Given a starting point in the graph, find the shortest distance from the starting point to other vertices.
When the weights of each edge are equal, the breadth-first algorithm can solve the single-source shortest path problem
But not when the weights are not equal, because the breadth-first algorithm does not consider the weights, it only considers the number of edges.
2 Breadth-first traversal is similar to level-order traversal in a tree, and depth-first search traversal is similar to pre-order traversal in a tree.
3 Breadth-first search requires a queue, and depth-first search requires a stack.
4 For a non-connected undirected graph G, using depth-first traversal to access all vertices, the number of calls to DFS in the DFSTraverse function is exactly equal to?
5 Breadth First Search Spanning Tree for Graph, Depth First Search Spanning Tree for Graph
边栏推荐
- binary search && tree
- Get out of the machine learning world forever!
- Embedded system driver primary [2] - based on character device driver _ basic framework
- uview 2.x版本 tabbar在uniapp小程序里头点击两次才能选中图标
- Detailed explanation of ORACLE expdp/impdp
- RKMPP 在FFmpeg上实现硬编解码
- stack && queue
- 二叉树的类型、构建、遍历、操作
- 未来的金融服务永远不会停歇,牛市仍将继续 2021-05-28
- 政策利空对行情没有长期影响,牛市仍将继续 2021-05-19
猜你喜欢
随机推荐
Based on the flask mall administrator functions
二分查找 && 树
好用的php空间,推荐国内三个优质的免费PHP空间[通俗易懂]
Kunpeng devkit & boostkit
HALCON: 对象(object)从声明(declaration)到结束(finalization)
你真的懂单例模式么
CSDN(成长一夏竞赛)- 最大数
ORACLE expdp/impdp详解
【C语言】函数哪些事儿,你真的get到了吗?(1)
MySQL - ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
网络安全第四次作业
How to do short video food from the media?5 steps to teach you to get started quickly
【学习笔记】数位dp
uview 2.x版本 tabbar在uniapp小程序里头点击两次才能选中图标
GTK:Gdk-CRITICAL **: IA__gdk_draw_pixbuf: assertion ‘GDK_IS_DRAWABLE (drawable)‘ failed
网络安全第一次作业(2)
rust使用mysql插入数据
腾讯安全发布Tencent Cloud EdgeOne,为企业出海打造安全加速一体化服务
栈 && 队列
【C语言】函数哪些事儿,你真的get到了吗?(2)