We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d2ff1a commit 20b4661Copy full SHA for 20b4661
shortest_path/dijkstra.py
@@ -25,7 +25,7 @@ def shortest_path(self, start_node):
25
for neighbor in node_neighbors[start_node]:
26
parent[neighbor] = start_node
27
distance[neighbor] = edge_weight[(start_node, neighbor)]
28
- not_visit = [_ for _ in range(num_node) if _ != start_node] # 还没有访问的节点
+ not_visit = [_ for _ in range(num_node) if _ != start_node] # 还没有访问的节点
29
30
while len(not_visit):
31
min_w_node = not_visit[0] # min_w_node: 某阶段开始节点start_node到它的距离最短的点
0 commit comments