🤖depth-first search
🚧 under construction
// code// pseudo code
dfs(Graph G, GraphNode root) {
// base case
if (root is null) return
// mark root as visited
root.visited = true
for (neighbors n of root in G)
if (n is not yet visited)
dfs(G, n) // recursive call
}Last updated