1.

In the given graph, what is the minimum cost to travel from vertex 1 to vertex 3?(a) 3(b) 2(c) 10(d) -3The question was asked during an online exam.My question is taken from Shortest Path in section Shortest Path of Data Structures & Algorithms II

Answer»

Correct choice is (d) -3

The EXPLANATION is: The minimum cost required to travel from node 1 to node 5 is -3.

1-5, cost is -4

5-4, cost is 6

4-3, cost is -5

Hence total cost is -4 + 6 + -5 = -3.



Discussion

No Comment Found

Related InterviewSolutions