Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9280db2 commit 95f879aCopy full SHA for 95f879a
src/graphs/shortest-path/bellman-ford.js
@@ -47,7 +47,8 @@
47
* @param {Array} edges Edges of the graph.
48
* @param {Number} source Start vertex.
49
* @returns {Object} Object with two arrays (parents and distances)
50
- * with shortest-path information.
+ * with shortest-path information or undefined if the graph
51
+ * has a negative cycle.
52
*/
53
exports.bellmanFord = function (vertexes, edges, source) {
54
var distances = {};
0 commit comments