Open In App

Algorithms | Graph Shortest Paths | Question 15

Like Article
Like
Save Article
Save
Share
Report issue
Report

Is the following statement valid?.

Given a graph where all edges have positive weights, the shortest paths produced by Dijsktra and Bellman Ford algorithm may be different but path weight would always be same.
(A) True
(B) False


Answer: (A)

Explanation: Dijkstra and Bellman-Ford both work fine for a graph with all positive weights, but they are different algorithms and may pick different edges for shortest paths.

Quiz of this Question


Last Updated : 28 Jun, 2021
Like Article
Save Article
Share your thoughts in the comments
Similar Reads