1.

Consider the following graph. What is the minimum cost to travel from node A to node C?(a) 5(b) 2(c) 1(d) 3The question was posed to me in an online quiz.Question is from Shortest Path topic in portion Shortest Path of Data Structures & Algorithms II

Answer»

The correct choice is (b) 2

Easy explanation - The MINIMUM COST to TRAVEL from node A to node C is 2.

A-D, cost=1

D-B, cost=-2

B-C, cost=3

Hence the total cost is 2.



Discussion

No Comment Found

Related InterviewSolutions