Interview
Graph problems that keep appearing in interviews - a compilation
11 months ago
192
After giving 15+ interviews this year, here are graph problems I've seen repeatedly:
BFS/DFS based:
- Number of islands
- Clone graph
- Word ladder
- Rotten oranges
Shortest path:
- Network delay time (Dijkstra)
- Cheapest flights within K stops
Topological Sort:
- Course schedule I and II
- Alien dictionary
Union Find:
- Number of connected components
- Accounts merge
If you can solve all of these comfortably, you'll handle 90% of graph questions in interviews imo.
graphsinterview-prepcompilationdsa