Skip to content
ı
Workspace
Visualizer
Search anything…
⌘ K
Desk
Path
Problems
Review
More
Library
/
Depth-First Search (DFS)
graphs
Best
O(V + E)
Avg
O(V + E)
Worst
O(V + E)
Space
O(V)
Preparing Depth-First Search (DFS)...
Traverses deep along each branch as far as possible before backtracking using a LIFO stack.