ThinkViz LogoThinkViz
← Back to Explorer

Depth-First Search

Depth-First Search (DFS) explores as deep as possible along each branch before backtracking. It relies on a LIFO stack or recursive function call stack.

Category:Uninformed Search
Difficulty:Beginner
Time complexity:O(V + E)
Space complexity:O(V)
Interactive visualizationDFS Visualizer
Edit mode: Click/drag to draw walls, drag Start (S) or Goal (G)
Start / Goal Wall Visited Frontier Path
S
G
0 / 0
Speed:
Nodes Explored0
Frontier Size0
Path Cost g(n)
Total Steps0
No step trace active. Click "Visualize A*" to begin algorithm execution.