Algorithm visualizer
Pick an algorithm, enter your own numbers or use a preset, then step through the run. The pseudocode and the explanation follow each step.
Follow one path as deep as it goes, then back up to try the next branch. The call stack holds the path.
Run DFS on the connected preset, then on a different start node. Does the visit order change, and does the set of visited nodes?
Step 1 of 37
Call stack (top on the right)empty
Call dfs(0).