Depth-First Search (DFS) is a graph traversal algorithm that explores a branch as deeply as possible before backtracking, using a stack (explicitly or via recursion) to manage the search frontier. It prioritizes plunging down one path until it hits a dead end or a goal, making it memory-efficient for deep graphs but not guaranteed to find the shortest path. This backtracking behavior is fundamental to exploring state spaces in puzzles, dependency resolution, and network analysis.
