Which of the following statement(s) is/are correct regarding Bellman-Ford…

PYQ GATE 2009

Which of the following statement(s) is/are correct regarding Bellman-Ford shortest path algorithm?

P. Always finds a negative weighted cycle, if one exists.

Q. Finds whether any negative weighted cycle is reachable from the source.

  1. A.

    P only

  2. B.

    Q only

  3. C.

    both P and Q

  4. D.

    neither P nor Q

Attempted by 517 students.

Sign up free to check your answer

Sign up free

Explore the full course: Algorithms

Loading lesson…