Skip to content

Commit 6135d44

Browse files
Update A* Search
1 parent 47a9932 commit 6135d44

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

searches/A_star_search.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,9 @@ def a_star_search(grid: List[List[int]], src: Tuple[int, int], dest: Tuple[int,
191191
print("Failed to find the destination cell")
192192

193193

194-
# Driver Code
194+
# Driver Code
195195

196-
197-
def main() -> None:
196+
if __name__ == "__main__":
198197
"""
199198
Run the A* search algorithm on a predefined grid.
200199
@@ -227,6 +226,3 @@ def main() -> None:
227226
# Run the A* search algorithm
228227
a_star_search(grid, src, dest)
229228

230-
if __name__ == "__main__":
231-
main()
232-

0 commit comments

Comments
 (0)