Open In App

Algorithms | Graph Shortest Paths | Question 7

Like Article
Like
Save
Share
Report

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

(A)

Θ(V2)

(B)

Θ(V2 log v)

(C)

Θ(V3)

(D)

Θ(V3 log v)



Answer: (C)

Explanation:

Time complexity of Bellman-Ford algorithm is Î˜(VE) where V is number of vertices and E is number edges . If the graph is complete, the value of E becomes Î˜(V2). So overall time complexity becomes Î˜(V3)

Hence, option C is the correct answer.


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


Last Updated : 19 Nov, 2018
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads