Depth-First Search (DFS) Visualization

Explore graph vertices depth-wise using a stack-based approach

Add Vertex

Add Edge

Graph Visualization

Add vertices and edges to create a graph, then run DFS!

DFS Traversal Path

Graph Statistics

Vertices: 0
Edges: 0
Visited: 0
Type: Undirected

Legend

Unvisited Vertex
Current Vertex
Visited Vertex
Traversed Edge

DFS Algorithm Properties

Time Complexity
O(V + E)
Space Complexity
O(V)
Data Structure
Stack
Use Cases
Path finding, Topological sort