一种树的搜索算法,它在访问节点的兄弟节点之前,先探索节点的第一个子节点。Tarjan (1972) 以及 Hopcroft 和 Tarjan (1973) 表明,深度优先搜索为图论中的许多问题提供了线性时间算法 (Skiena 1990)。
深度优先遍历
另请参阅
广度优先遍历使用 Wolfram|Alpha 探索
参考文献
Hopcroft, J. and Tarjan, R. "Algorithm 447: Efficient Algorithms for Graph Manipulation." Comm. ACM 16, 372-378, 1973.Pemmaraju, S. and Skiena, S. "Depth-First Search." §7.1.2 in Computational Discrete Mathematics: Combinatorics and Graph Theory with Mathematica. Cambridge, England: Cambridge University Press, pp. 280-282, 2003.Skiena, S. "Breadth-First and Depth-First Search." §3.2.5 in Implementing Discrete Mathematics: Combinatorics and Graph Theory with Mathematica. Reading, MA: Addison-Wesley, pp. 95-97, 1990.Tarjan, R. E. "Depth-First Search and Linear Graph Algorithms." SIAM J. Comput. 1, 146-160, 1972.在 Wolfram|Alpha 中被引用
深度优先遍历请引用为
Weisstein, Eric W. "深度优先遍历。" 来自 MathWorld--Wolfram 网络资源。 https://mathworld.net.cn/Depth-FirstTraversal.html