leetcode

Bellman-Ford Algorithm

“Bellman-Ford algorithm” is only applicable to “graphs” with no “negative weight cycles”.

Steps

  1. Make every vertexes in an array with infinity value
  2. Iterate a loop for n - 1 times where n means the number of vertexes.

Explanation

Bellman-Ford in 5 minutes

Relative problem

Network Delay Time