Skip to content

Commit

Permalink
Fix UndirectedGraph having weight=0 instead of weight=1
Browse files Browse the repository at this point in the history
  • Loading branch information
Semin Bae committed Jun 28, 2020
1 parent 17ee28f commit 0463b29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Chapter17(Graphs).js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var graph1 = new UndirectedGraph();
graph1.addVertex(1);
graph1.addVertex(2);
graph1.addEdge(1, 2, 1);
graph1.edges; // 1: {2: 0}, 2: {1: 0}
graph1.edges; // 1: {2: 1}, 2: {1: 1}
graph1.addVertex(3);
graph1.addVertex(4);
graph1.addVertex(5);
Expand Down

0 comments on commit 0463b29

Please sign in to comment.