What is Depth-first search?
A way of searching a graph or tree that goes as far as possible along one path and backtracks to try another path when it reaches a dead end. It is implemented with recursion or a stack and is used for maze solving, finding connected components and cycles, and topological sorting. It is abbreviated DFS.
Japanese name: 深さ優先探索
Depth-first search appears in 3 practice questions across 1 topic, including Data Structures and Algorithms.