Graph Traversal

DFS Exploration Monster

Depth-First Search goes deep into branches using a Stack (LIFO) before backtracking. It is core to cycle detection and topological sorting.

0
Visited Nodes
0
Stack Size
0
Total Nodes
0
Traversal Steps
DEPTH-FIRST SEARCH
LIFO Stack (Bottom Top)
Stack is empty

Execution Log

Click Run DFS to start. Double click canvas to add nodes. Drag to connect.

Graph Controls

Editor mode is active. Double click on canvas to add nodes. Drag from one node to another to create directed edges.

Traversal Complexity

Time Complexity O(V + E)
Space Complexity O(V)