Graph Search Lab

Build an undirected graph, pick a start node, and watch DFS or BFS unfold with a live frontier.

Build

Add edges by clicking two nodes. Delete removes nodes or edges.

Algorithm

Traversal

Stack

Current: —
Reached

DFS Tree

The tree grows as each node is first reached.