GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
← 💻 Coding & Engineering Craft
Core

Graph Traversal and Topological Sort

Grids, dependency chains, task schedulers, and path problems are all graphs in disguise. BFS finds shortest paths in unweighted graphs and explores level by level; DFS goes deep and is the backbone of cycle detection. Topological sort orders a DAG so every dependency comes before what needs it, and the same machinery tells you whether a dependency graph has an impossible cycle.

a free account unlocks the core curriculum tier · no card

Related concepts

Practise this in questions