Google News
logo
Data Structures Algorithms - Quiz(MCQ)
What is the best time complexity we can achieve to precompute all-pairs shortest paths in a weighted graph?
A)
O(n)
B)
O(n^2)
C)
O(n^4)
D)
O(n^3)

Correct Answer :   O(n^3)

Advertisement