fix: updated description comment

This commit is contained in:
Tapajyoti Bose
2021-02-28 08:44:38 +05:30
committed by GitHub
parent 60dd4069e8
commit c1e0dcb036

View File

@ -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'))