Question

The time complexity of computing the all-pairs shortest paths in a dense graph with V vertices using Floyd–Warshall is:

A (V + E)
B O(V²)
C O(V³)
D O(V² log V)
E O(VE)
Practice Next

Hey! Ask a query