Skip to content
Related Articles
Open in App
Not now

Related Articles

Algorithms | Analysis of Algorithms | Question 12

Improve Article
Save Article
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article

What is the time complexity of Floyd–Warshall algorithm to calculate all pair shortest path in a graph with n vertices?









Answer: (D)


Floyd–Warshall algorithm uses three nested loops to calculate all pairs shortest path. So, the time complexity is Theta(n3).
Please read here for more details.

Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!