It is an algorithm that helps us to compute the shortest path from a vertex to all other vertexes in a weighted graph. The following algorithm was first proposed by **Alfonso Shimbel** in **1955** but was named after **Richard Bellman** and **Lester Ford** **Jr**. in **1958** and **1956**. It is an upgraded version of Dijkstra’s Algorithm and a more flexible and adaptive algorithm as it is capable of handling the edges with negative weight.

The answer is yes, there are many possibilities where you can find edges having negative weights in real life. For example, consider there are two chemicals…