GATE | GATE CS 2013 | Question 19
What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices?
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
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.