Advanced Graphs — Complete Guide (MST, SCC, Bridges, Floyd-Warshall, A*)
Master advanced graph algorithms: Kruskal and Prim MST, Tarjan SCC, articulation points, bridges, Floyd-Warshall all-pairs shortest path, and A* search.
webcoderspeed.com
5 articles
Master advanced graph algorithms: Kruskal and Prim MST, Tarjan SCC, articulation points, bridges, Floyd-Warshall all-pairs shortest path, and A* search.
Find the minimum spanning tree of a weighted graph using Kruskal's algorithm. Sort edges by weight, use Union-Find to avoid cycles. O(E log E) time.
Build the minimum spanning tree using Prim's algorithm: start from any vertex, greedily expand by always adding the minimum-weight crossing edge using a min-heap.
Connect all n points with minimum total Manhattan distance cost. Models the problem as a complete graph MST and applies optimised Prim's without building all O(n²) edges explicitly.
Complete recap of all 20 advanced graph problems with algorithm selection guide, complexity comparison, and pattern recognition cues.