Graph Algorithms When to Use Use this skill when working on graph-algorithms problems in graph number theory. Decision Tree 1. Traversal selection - BFS: shortest paths (unweighted), level structure - DFS: cycle detection, topological sort, SCC 2. Shortest path algorithms | Algorithm | Use Case | Complexity | |-----------|----------|------------| | Dijkstra | Non-negative weights | O((V+E) log V) | | Bellman-Ford | Negative weights | O(VE) | | Floyd-Warshall | All pairs | O(V^3) | 3. Minimum Spanning Tree - Prim's: dense graphs, greedy from vertex - Kruskal's: sparse graphs, union-find - 4. N…