Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | GATE CS 2013 | Question 19

Improve Article
Save Article
  • Difficulty Level : Expert
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article

What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices?

gatecs20138
(A) A
(B) B
(C) C
(D) D


Answer: (C)

Explanation: Time complexity of Bellman-Ford algorithm is O(VE) where V is number of vertices and E is number of edges. For a complete graph with n vertices, V = n, E = O(n^2). So overall time complexity becomes O(n^3)

Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!