1.

Bellmann Ford algorithm is used to indicate whether the graph has negative weight cycles or not.(a) True(b) FalseI had been asked this question in an online interview.My question comes from Shortest Path topic in division Shortest Path of Data Structures & Algorithms II

Answer» RIGHT answer is (a) True

Easiest explanation - Bellmann Ford algorithm returns true if the GRAPH does not have any NEGATIVE WEIGHT cycles and returns false when the graph has negative weight cycles.


Discussion

No Comment Found

Related InterviewSolutions