Skip to content
Related Articles

Related Articles

Algorithms | Graph Shortest Paths | Question 12
  • Last Updated : 23 Oct, 2013

Is the following statement valid about shortest paths?
Given a graph, suppose we have calculated shortest path from a source to all other vertices. If we modify the graph such that weights of all edges is becomes double of the original weight, then the shortest path remains same only the total weight of path changes.
(A) True
(B) False

Answer: (A)

Explanation: The shortest path remains same. It is like if we change unit of distance from meter to kilo meter, the shortest paths don’t change.

Quiz of this Question

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :