dfs
/ˌdiː ef ˈes/
词性: 名词(缩写)
EN
深度优先搜索(Depth-First Search),一种用于遍历树或图数据结构的算法,会尽可能深地搜索分支,直到节点的所有子节点都被访问后再回溯。
We used DFS to traverse the binary tree and find all valid paths from the root to the leaf nodes.
我们使用深度优先搜索遍历二叉树,找出从根节点到叶子节点的所有有效路径。
词源
DFS 是英文 Depth-First Search 的首字母缩写,该算法由计算机科学家在20世纪50年代提出,是图遍历领域的经典基础算法。
助记
可以把 DFS 拆解为三个字母分别对应 Deep(深入)、First(优先)、Search(搜索),记忆为“优先往深处搜索”,对应算法的核心特征。
快速答案
dfs 是什么意思?
dfs 的意思是: 深度优先搜索(Depth-First Search),一种用于遍历树或图数据结构的算法,会尽可能深地搜索分支,直到节点的所有子节点都被访问后再回溯。
dfs 怎么读?
dfs: /ˌdiː ef ˈes/
dfs 如何用于句子?
We used DFS to traverse the binary tree and find all valid paths from the root to the leaf nodes.