Graph Traversal
Exploring every node with depth-first and breadth-first search
Depth-first search follows one path as far as it can before backtracking, while breadth-first search visits nodes in order of their distance from the start. Both visit every node and edge in time on a graph with nodes and edges. Kahn’s algorithm builds on them to order a directed acyclic graph so that every edge points forward.