fine tune

This commit is contained in:
krahets
2023-09-17 01:13:15 +08:00
parent b2246e11a7
commit 9f59c572b5
32 changed files with 44 additions and 44 deletions

View File

@@ -16,7 +16,7 @@ class GraphAdjList:
def __init__(self, edges: list[list[Vertex]]):
"""构造方法"""
# 邻接表key: 顶点value该顶点的所有邻接顶点
self.adj_list = dict[Vertex, Vertex]()
self.adj_list = dict[Vertex, list[Vertex]]()
# 添加所有顶点和边
for edge in edges:
self.add_vertex(edge[0])