We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5cce3a7 commit 1175107Copy full SHA for 1175107
graphs/uniform_cost_search.py
@@ -74,7 +74,7 @@ def ucs(self, start_vertex: int, goal_vertex: int) -> tuple[int, list[int]]:
74
if neighbor not in visited or visited[neighbor] > cost + edge_cost:
75
pq.put((cost + edge_cost, neighbor, path + [neighbor]))
76
77
- return float('inf'), [] # If no path found
+ return float("inf"), [] # If no path found
78
79
80
if __name__ == "__main__":
0 commit comments