Mixed Practice: Graph Traversals
You've learned BFS, DFS, cycle detection, and DP on DAGs. Now you choose which technique to use for each problem.
Lessons
1. Intro
Pattern recognition
2. The Decision Framework
(When to use each technique)
3. Quiz: Pattern Recognition
Knowledge check
4. Quiz: When DFS Fails
Knowledge check
5. Problem - Message Route
(CSES shortest path)
6. Think About It
(Pause before pattern reveal)
7. Quiz: Message Route Pattern
Knowledge check
8. Message Route - Implementation
(BFS with path reconstruction)
9. Problem - Labyrinth
(CSES maze escape)
10. Think About It
(Why not DFS)
11. Quiz: Labyrinth Pattern
Knowledge check
12. Labyrinth - Implementation
(BFS on grid)
13. Problem - Course Schedule
(LeetCode 207 prerequisites)
14. Think About It
(Detecting impossibility)
15. Quiz: Course Schedule Pattern
Knowledge check
16. Course Schedule - Implementation
(Cycle detection via DFS)
17. Problem - Round Trip
CSES undirected cycle
18. Think About It
Undirected vs directed
19. Quiz: Round Trip Pattern
Knowledge check
20. Round Trip - Implementation
(DFS with parent tracking)
21. Problem - Monsters
(CSES multi-source BFS)
22. Think About It
(Multiple sources)
23. Quiz: Monsters Pattern
Knowledge check
24. Monsters - Implementation
(Two-phase BFS)
25. Problem - Longest Flight Route
(CSES longest path in DAG)
26. Think About It
(Longest path technique)
27. Quiz: Longest Flight Route Pattern
Knowledge check
28. Longest Flight Route - Implementation
DP on DAG with paths
29. Quiz: Technique Selection
Knowledge check
30. Quiz: Grid Pattern Review
Knowledge check
31. Quiz: DAG Pattern Review
Knowledge check
32. Pattern Summary
(Quick reference guide)
33. Common Mistakes
(What to avoid)
34. Next Steps
(What comes after)
35. Section Recap
(Pattern recognition proficiency)