Note: The translation for this entry is currently under quality review. Some content is temporarily displayed in English only.
depth first search
This term is a technical specification used primarily in computer science and discrete mathematics. It describes a specific strategy for exploring a state space, characterized by a "dive deep" approach where the algorithm prioritizes depth over breadth. It is frequently contrasted with breadth first search, which explores all neighbors at the current level before moving deeper.
In practical application, this process is often implemented using a stack data structure or through recursion. Because it explores a single path to its conclusion before backtracking, it is particularly useful for solving puzzles, finding paths in mazes, or detecting cycles in a graph, though it may not always find the shortest path first.