Skip to content

Commit c1e0dcb

Browse files
authored
fix: updated description comment
1 parent 60dd406 commit c1e0dcb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Graphs/BreadthFirstShortestPath.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/*
2-
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.
2+
Breadth-first approach can be applied to determine the shortest path between two nodes
3+
in an equi-weighted graph. It searches the target node among all neighbors of the
4+
starting node, then the process is repeated on the level of the neighbors of the
5+
neighbors and so on.
36
(See also: https://en.wikipedia.org/wiki/Breadth-first_search )
47
(see also: https://www.koderdojo.com/blog/breadth-first-search-and-shortest-path-in-csharp-and-net-core )
58
*/
@@ -82,4 +85,4 @@ F --> G
8285
console.log(breadthFirstShortestPath(graph, 'C', 'E'))
8386
console.log(breadthFirstShortestPath(graph, 'E', 'B'))
8487
console.log(breadthFirstShortestPath(graph, 'F', 'G'))
85-
console.log(breadthFirstShortestPath(graph, 'A', 'G'))
88+
console.log(breadthFirstShortestPath(graph, 'A', 'G'))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy