1.

Bellmann Ford Algorithm can be applied for _____________(a) Undirected and weighted graphs(b) Undirected and unweighted graphs(c) Directed and weighted graphs(d) All directed graphsI got this question in an interview for job.I need to ask this question from Shortest Path topic in section Shortest Path of Data Structures & Algorithms II

Answer»

Right choice is (c) Directed and weighted graphs

Easy explanation - Bellmann Ford ALGORITHM can be applied for all directed and weighted graphs. The WEIGHT function in the GRAPH may EITHER be positive or negative.



Discussion

No Comment Found

Related InterviewSolutions