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

… [Trackback]
[…] Read More to that Topic: geeksforgeeks.org/algorithms-graph-shortest-paths-question-14/ […]
… [Trackback]
[…] Find More to that Topic: geeksforgeeks.org/algorithms-graph-shortest-paths-question-14/ […]