Loading Thita. Almost there...
Graph Traversal Patterns - DFS and BFS · 1 of 12
Use DFS to find connected components and count islands in grids. Flood fill and province counting problems.
Access the full theory, code examples, and practice problems.
Start LearningUse BFS for shortest path in unweighted graphs. Solve word ladder, rotting oranges, and matrix problems.
Master topological sorting using Kahn's BFS algorithm. Solve course schedule and build order problems.
Detect cycles in directed graphs using DFS with coloring (white, gray, black) approach.
Find shortest paths with constraints using Bellman-Ford algorithm and BFS with limited stops.