#traversal Topics tagged "traversal". Breadth-First SearchExplore a graph in concentric layers from a source — the simplest way to find shortest paths in an unweighted graph.Depth-First SearchPlunge as deep as possible along each branch, then backtrack — the traversal behind spanning trees, cycle detection, and topological order.