Why do Shortest Path Algorithms fail in Graphs with Negative Cycle?
The shortest path algorithms such as Dijkstra and Bellman-Ford algorithm don't give the right results when there's a negative cycle in the graph. Dijkstra's AlgorithmBellman-Ford AlgorithmGraph with Negative EdgeFailsPassGraph with…