Graph Algorithms
If you can teach Graph Algorithms using bus routes, you know it. If you only know the heading, you don’t.
For Graph Algorithms, time vs memory is in play. Don’t blame it until you have traced bus routes.
Without Graph Algorithms, a city map gets messy and bus routes is hard to trust.
Priya ships Graph Algorithms in a city map. That is the use case worth saying.
If bus routes breaks under Graph Algorithms, check no visited set → infinite loop first.
After Graph Algorithms, Priya should still remember no visited set → infinite loop.
Viva for Graph Algorithms — what it is → BFS queue / DFS stack → the mistake (no visited set → infinite loop).
Board: bus routes. Dry-run Graph Algorithms. Name the trap: no visited set → infinite loop.