Loading Thita. Almost there...
Graph Traversal Patterns - DFS and BFS · 6 of 12
Master Dijkstra's algorithm for finding shortest paths in weighted graphs with non-negative edges.
Access the full theory, code examples, and practice problems.
Start LearningUse DFS to find connected components and count islands in grids. Flood fill and province counting problems.
Use 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.