A cyclic graph: step through DFS cycle detection on a looping graph and on a tree, break the cycle with one edge, or build your own graph and detect cycles in free play.

Cyclic · DFS finds a back edge unseen current on stack done cycle
DFS stack (top = current path tip)
Step 0 / 0

Press Play. DFS walks the graph keeping a stack of the current path — a cycle is an edge back to a vertex still on that stack.

Speed
Click two vertices to toggle an edge between them. Drag a vertex to move it. Then hit Detect cycle.
vertices
0
edges
0
on stack
0
result