Graphs
Graphs represent relationships and connectivity — foundational for traversal, search, cycles, and dependency resolution problems.
1.0 Graph Traversals
- BFS (level order, shortest path in unweighted)
- DFS (recursion + stack)
- Connected components
2.0 Directed Graphs and Topological Sort
- Kahn’s Algorithm (BFS)
- DFS-based topo sort
- Cycle detection in directed graphs
3.0 Undirected Graphs and Cycle Detection
- Union-Find / DSU
- DFS with parent tracking
- Bipartite check (BFS coloring)
4.0 Shortest Path Algorithms
- Dijkstra (min-heap based)
- Bellman-Ford (negative weights)
- A* Search (heuristics)
5.0 MST and Spanning Trees
- Prim’s Algorithm
- Kruskal’s Algorithm
- Disjoint Set Union applications
6.0 Grid-Based Graphs
- Word search, island count
- Flood fill and BFS
- Multi-source BFS (rotting oranges)
7.0 Backtracking and Constraint Solving on Graphs
- N-Queens
- Sudoku
- Hamiltonian Path (TSP, exhaustive)
8.0 Advanced Graph Topics
- Articulation points and bridges
- Tarjan’s algorithm (SCC)
- Top K shortest paths (Yen’s algorithm)