From 196f0185f975c10e47e3d0e596f3cb39261616d5 Mon Sep 17 00:00:00 2001 From: jatin0004 <63697024+jatin0004@users.noreply.github.com> Date: Wed, 13 Oct 2021 01:40:45 +0530 Subject: [PATCH] explanation updated --- src/algorithms/graph/bellman-ford/bellmanFord.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/graph/bellman-ford/bellmanFord.js b/src/algorithms/graph/bellman-ford/bellmanFord.js index 70e811d9..fec13a84 100644 --- a/src/algorithms/graph/bellman-ford/bellmanFord.js +++ b/src/algorithms/graph/bellman-ford/bellmanFord.js @@ -8,7 +8,7 @@ export default function bellmanFord(graph, startVertex) { const previousVertices = {}; // Init all distances with infinity assuming that currently we can't reach - // any of the vertices except start one. + // any of the vertices except start one and try to get to that point. distances[startVertex.getKey()] = 0; graph.getAllVertices().forEach((vertex) => { previousVertices[vertex.getKey()] = null;