Skip to content

Commit

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

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

0 comments on commit 95eca2d

Please sign in to comment.