From c1e0dcb0368b4962b71a1d1e6bf09778404ee240 Mon Sep 17 00:00:00 2001 From: Tapajyoti Bose <44058757+ruppysuppy@users.noreply.github.com> Date: Sun, 28 Feb 2021 08:44:38 +0530 Subject: [PATCH] fix: updated description comment --- Graphs/BreadthFirstShortestPath.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Graphs/BreadthFirstShortestPath.js b/Graphs/BreadthFirstShortestPath.js index a1704ee3a..18df52897 100644 --- a/Graphs/BreadthFirstShortestPath.js +++ b/Graphs/BreadthFirstShortestPath.js @@ -1,5 +1,8 @@ /* -Breadth-first approach can be applied to determine the shortest path between two nodes in an unweighted graph. It searches the target node among all neighbors of the starting node. Then the process is repeated on the level of the neighbors of the neighbors and so on. +Breadth-first approach can be applied to determine the shortest path between two nodes +in an equi-weighted graph. It searches the target node among all neighbors of the +starting node, then the process is repeated on the level of the neighbors of the +neighbors and so on. (See also: https://en.wikipedia.org/wiki/Breadth-first_search ) (see also: https://www.koderdojo.com/blog/breadth-first-search-and-shortest-path-in-csharp-and-net-core ) */ @@ -82,4 +85,4 @@ F --> G console.log(breadthFirstShortestPath(graph, 'C', 'E')) console.log(breadthFirstShortestPath(graph, 'E', 'B')) console.log(breadthFirstShortestPath(graph, 'F', 'G')) -console.log(breadthFirstShortestPath(graph, 'A', 'G')) +console.log(breadthFirstShortestPath(graph, 'A', 'G'))