← Quiz: Shortest Paths: all 10 questions
Quiz: Shortest Paths · Question 10 of 10
What is the time complexity of Bellman-Ford?
What is the time complexity of Bellman-Ford?
- A.O(V + E)
- B.O(V · E)
- C.O(E log V)
- D.O(V³)
Answer & explanation
Correct answer: O(V · E)
It relaxes all E edges in each of V − 1 rounds.
Can you get the rest right without peeking?
Take the timed Quiz: Shortest Paths quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →