Graphs
Traverse graphs and grids; order dependencies; group components.
- DSA.11.01Pattern 14: Graph traversal (BFS/DFS on graphs and grids)CoreMid-levelBeing written
- DSA.11.02Pattern 15: Topological sortCoreMid-levelBeing written
- DSA.11.03Pattern 16: Union-find (disjoint set) + Weighted shortest paths (awareness)Mid-levelBeing written
Interview questions in this module
- Count the islands in a grid. What is the complexity?
- How do you detect a cycle in a directed graph?
- Explain topological sort and a real frontend use of it.
- When would you use union-find instead of BFS?
- Why does BFS give the shortest path in an unweighted graph?