Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Graph Theory for Competitive Programming
·
Module 2
Core Traversal Algorithms: BFS & DFS
1
Recursive DFS for Graph Traversal
Implement Depth-First Search (DFS) recursively to explore a graph.
2
Iterative BFS with a Queue
Implement Breadth-First Search (BFS) iteratively using a queue.
3
BFS Shortest Path Proof (Unweighted Graphs)
Prove that BFS finds the shortest path in terms of number of edges in an unweighted graph.
4
DFS for Connected Components
Use DFS to find all connected components in an undirected graph.
5
Cycle Detection using DFS
Detect cycles in both undirected and directed graphs using DFS.
6
Grid Traversal with Implicit Graphs
Model a 2D grid as an implicit graph to solve traversal problems like shortest path or flood fill.
7
Bipartite Graph Check Using Traversal
Determine if a graph is bipartite by attempting a 2-coloring during a traversal (BFS or DFS).
Previous module
Graph Fundamentals and Representations
Next module
Foundations of Dynamic Programming