Skip to content

Commit

Permalink
Update Graph-Adjacency-Matrix.py
Browse files Browse the repository at this point in the history
  • Loading branch information
itcharge committed Mar 17, 2022
1 parent 95eca2d commit 8153539
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Templates/08.Graph/Graph-Adjacency-Matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def printGraph(self):
print(str(vi) + ' - ' + str(vj) + ' : ' + str(val))


graph = Graph(6)
edges = [[1, 4, 3],[1, 3, 9],[3, 4, 6],[2, 5, 4],[4, 5, 2]]
graph = Graph(5)
edges = [[1, 2, 5],[2, 1, 5],[1, 3, 30],[3, 1, 30],[2, 3, 14],[3, 2, 14],[2, 4, 26], [4, 2, 26]]
graph.creatGraph(edges)
print(graph.get_edge(3, 4))
graph.printGraph()

0 comments on commit 8153539

Please sign in to comment.