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

## Recommended Posts:

- Algorithms | Graph Shortest Paths | Question 14
- Algorithms | Graph Shortest Paths | Question 2
- Algorithms | Graph Shortest Paths | Question 3
- Algorithms | Graph Shortest Paths | Question 4
- Algorithms | Graph Shortest Paths | Question 14
- Algorithms | Graph Shortest Paths | Question 8
- Algorithms | Graph Shortest Paths | Question 9
- Algorithms | Graph Shortest Paths | Question 10
- Algorithms | Graph Shortest Paths | Question 11
- Algorithms | Graph Shortest Paths | Question 12
- Algorithms | Graph Shortest Paths | Question 13
- Algorithms | Graph Shortest Paths | Question 14
- Algorithms | Graph Shortest Paths | Question 15
- Johnson’s algorithm for All-pairs shortest paths | Implementation
- Number of paths from source to destination in a directed acyclic graph
- Shortest path in a directed graph by Dijkstra’s algorithm
- Building an undirected graph and finding shortest path using Dictionaries in Python
- Shortest path in a complement graph
- Create a Graph by connecting divisors from N to M and find shortest path
- Algorithms | Graph Traversals | Question 1