Algorithms where DFS() is used:Finding connected components. Topological sorting. Finding 2-(edge or vertex)-connected components. Finding strongly connected components. Solving puzzles with only one solution, such as mazes. (DFS can be adapted to find all solutions to a maze by only including nodes on the current path in the visited set.) 维基上的,我搬过来,深度优先算法的应用 1. 寻找连通分支 2. 拓扑排序 3. 寻找2边连通,或者2点连通 4. 寻找强连通 .... 都是数学应用或者图应用的的比较多吧
Topological sorting.
Finding 2-(edge or vertex)-connected components.
Finding strongly connected components.
Solving puzzles with only one solution, such as mazes. (DFS can be adapted to find all solutions to a maze by only including nodes on the current path in the visited set.) 维基上的,我搬过来,深度优先算法的应用
1. 寻找连通分支
2. 拓扑排序
3. 寻找2边连通,或者2点连通
4. 寻找强连通
....
都是数学应用或者图应用的的比较多吧