Skip to content

Commit 20b4661

Browse files
committed
corrected an indentation error
1 parent 5d2ff1a commit 20b4661

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shortest_path/dijkstra.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def shortest_path(self, start_node):
2525
for neighbor in node_neighbors[start_node]:
2626
parent[neighbor] = start_node
2727
distance[neighbor] = edge_weight[(start_node, neighbor)]
28-
not_visit = [_ for _ in range(num_node) if _ != start_node] # 还没有访问的节点
28+
not_visit = [_ for _ in range(num_node) if _ != start_node] # 还没有访问的节点
2929

3030
while len(not_visit):
3131
min_w_node = not_visit[0] # min_w_node: 某阶段开始节点start_node到它的距离最短的点

0 commit comments

Comments
 (0)