Depth-first search (DFS)

Home > Mathematics > Graph theory > Graph algorithms > Depth-first search (DFS)

Also used to traverse a graph, DFS starts from an initial node and visits as far as possible along a path before backtracking and continuing with another path.