当前位置:网站首页>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

边栏推荐
猜你喜欢
随机推荐
乐心湖‘s Blog——MySQL入门到精通 —— 囊括 MySQL 入门 以及 SQL 语句优化 —— 索引原理 —— 性能分析 —— 存储引擎特点以及选择 —— 面试题
苹果,与Web3 “八字不合”
SQL函数 UPPER
WiFi Association & Omnipeek Packet Capture Analysis
2022-08-02日报:2022年7月最热的10篇AI论文
Fabric.js 动态设置字号大小
面试SQL语句,学会这些就够了!!!
专访|带着问题去学习,Apache DolphinScheduler 王福政
方舟生存进化淘宝面板服务器是怎么一回事?
stack && queue
【C语言】夏日一题 —— 如何判断素数?
【C语言】细品分支结构——switch语句
鲲鹏devkit & boostkit
不精确微分/不完全微分(Inexact differential/Imperfect differential)
CVE-2020-27986(Sonarqube敏感信息泄漏) 漏洞修复
OpenMMLab简介
C语言提高篇(三)
软件测试和硬件测试的区别及概念
二叉树的类型、构建、遍历、操作
tinymce 如何实现动态国际化









