Last Updated :
19 Nov, 2018
What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices?
(A)
(B)
(C)
(D)
Answer: (C) Explanation: Time complexity of Bellman-Ford algorithm is
where V is number of vertices and E is number edges (See
this). If the graph is complete, the value of E becomes
. So overall time complexity becomes
Quiz of this Question
Share your thoughts in the comments
Please Login to comment...