Graph Traversal

Depth-First Search (DFS)

Depth-First Search is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node and explores as far as possible along each branch before backtracking.

📜 Live Explanation

Click "Play" to start traversal from the first node.

📦 Call Stack (Visual)

Stack is empty

🕒 Complexity

Time: O(V + E)

Space: O(V)

Graph Editor (Adjacency List)

Enter your graph structure here to test your homework problems.