DSAverse
Graph Algorithms
Loading Graph Algorithms...
BFS Traversal
visited: 0 / 7Initializing Sorting Algorithms...
Sorting
Trees
Graphs
Preparing interactive visualizations...
Graph Algorithms
Loading Graph Algorithms...
BFS Traversal
visited: 0 / 7Compute the shortest path between every pair of nodes at once — by letting paths route through one more intermediate node each round and relaxing the distance matrix.
Distance matrix — dist[i][j] = shortest i → j so far
Reference graph (directed, weighted)
O(V³)O(V²)Question 1 of 3
What does Floyd-Warshall compute?