Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 95f879a

Browse files
committed
Update bellman-ford's jsdocs
1 parent 9280db2 commit 95f879a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/graphs/shortest-path/bellman-ford.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
* @param {Array} edges Edges of the graph.
4848
* @param {Number} source Start vertex.
4949
* @returns {Object} Object with two arrays (parents and distances)
50-
* with shortest-path information.
50+
* with shortest-path information or undefined if the graph
51+
* has a negative cycle.
5152
*/
5253
exports.bellmanFord = function (vertexes, edges, source) {
5354
var distances = {};

0 commit comments

Comments
 (0)