The GATE Grind

GATE 2009 CS – Question 13

Algorithms · Graph Algorithms: Traversals, Minimum Spanning Trees, Shortest Paths · 1 mark · Multiple choice

Which statements are correct regarding the 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. P only
  2. Q only
  3. both P and Q
  4. neither P nor Q

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) Q only

Explanation

We are sorry we couldn't write detailed soluition for this, we are working on it!, please consider asking your own AI, its just 2-3 clicks with very minimum effort

More Graph Algorithms: Traversals, Minimum Spanning Trees, Shortest Paths questions

All Graph Algorithms: Traversals, Minimum Spanning Trees, Shortest Paths questions →