Skip to content

Commit 533a687

Browse files
authored
Merge pull request kyleshevlin#2 from coreysnyder/patch-1
Updates edges forEach Call
2 parents fb0ae8f + a122a7c commit 533a687

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

graphs/breadthFirstSearch.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,8 @@ nodes.forEach(node => {
135135
graph.addNode(node)
136136
})
137137

138-
edges.forEach((...nodes) => {
139-
// graph.addEdge(...nodes)
140-
graph.addEdge(nodes[0][0], nodes[0][1])
138+
edges.forEach((nodes) => {
139+
graph.addEdge(...nodes)
141140
})
142141

143142
graph.bfs('a', node => {

0 commit comments

Comments
 (0)