一種樹的搜尋演算法,它在訪問節點的兄弟節點之前,先探索節點的第一個子節點。Tarjan (1972) 以及 Hopcroft 和 Tarjan (1973) 表明,深度優先搜尋為圖論中的許多問題提供了線性時間演算法 (Skiena 1990)。
深度優先遍歷
另請參閱
廣度優先遍歷使用 探索
參考文獻
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.在 中被引用
深度優先遍歷請引用為
Weisstein, Eric W. "深度優先遍歷。" 來自 網路資源。 https://mathworld.tw/Depth-FirstTraversal.html