All roadmaps

Graphs in Depth roadmap

From flood fill on a grid to bridges, shortest paths and spanning trees.

For: Comfortable with BFS and DFS, want graphs to stop being the weak spot

Graphs

Traverse connected structures: islands, components, shortest hops in a grid.

Topological Sort

Order tasks by their dependencies and detect cycles.

Union-Find

Track which items are connected with near-constant-time merges and lookups.

Shortest Paths

Dijkstra and Bellman-Ford for weighted graphs.

Minimum Spanning Tree

Connect every node at minimum total cost with Kruskal or Prim.