5 subtopics · 21 problems
Graph Traversal
BFS, DFS, connected components, multi-source BFS, 0-1 BFS, and bipartite checking.
01Basic BFS
Standard BFS on graphs and grids — shortest path in unweighted graphs.
2 easy2 medium1 hard
| Problem | Difficulty | Link |
|---|---|---|
| 1843CSum in Binary Tree | easy | Solve |
| 580CKefa and Park | easy | Solve |
| 1272DRemove One Element | medium | Solve |
| 1900CAnji's Binary Tree | medium | Solve |
| 1886CIs It Flower? | hard | Solve |
02Multi-Source BFS
Start BFS from multiple sources simultaneously.
1 easy1 medium2 hard
| Problem | Difficulty | Link |
|---|---|---|
| 1921CSending Messages | easy | Solve |
| 1904BCollecting Game | medium | Solve |
| 1063BLabyrinth | hard | Solve |
| 1881FMinimum Maximum Distance | hard | Solve |
030-1 BFS
BFS on graphs with edge weights 0 and 1 using a deque.
3 hard
| Problem | Difficulty | Link |
|---|---|---|
| 1063BLabyrinth | hard | Solve |
| 1862EKolya and Movie Theatre | hard | Solve |
| 1837EPlayoff Fixing | hard | Solve |
04DFS & Connected Components
Traverse graphs, find connected components, flood fill.
2 easy2 medium1 hard
| Problem | Difficulty | Link |
|---|---|---|
| 1873D1D Eraser | easy | Solve |
| 277ALearning Languages | easy | Solve |
| 1843DApple Tree | medium | Solve |
| 1144FGraph Without Long Directed Paths | medium | Solve |
| 1886CIs It Flower? | hard | Solve |
05Bipartite Checking
2-color a graph — if it fails, the graph has an odd cycle.
3 medium1 hard
| Problem | Difficulty | Link |
|---|---|---|
| 1144FGraph Without Long Directed Paths | medium | Solve |
| 1862CFlower City Fence | medium | Solve |
| 1862DIce Cream Balls | medium | Solve |
| 1881FMinimum Maximum Distance | hard | Solve |
Was this helpful?