Skip to content
Related Articles

Related Articles

Improve Article

Algorithms | Graph Shortest Paths | Question 14

  • Last Updated : 28 Jun, 2021

Is the following statement valid?.

Given a weighted graph where weights of all edges are unique (no two edge have same weights), there is always a unique shortest path from a source to destination in such a graph.
(A) True
(B) False

Answer: (B)

Explanation: There can be more than one paths with same weight. Consider a path with one edge of weight 5 and another path with two edges of weights 2 and 3. Both paths have same weights.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :