Skip to content

Commit 0259580

Browse files
authored
Update rat_in_maze.py
Fixes TheAlgorithms#9066 I have resolved the bug by returning tuple as output
1 parent dec9643 commit 0259580

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backtracking/rat_in_maze.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ def solve_maze(maze: list[list[int]]) -> bool:
6464
solutions = [[0 for _ in range(size)] for _ in range(size)]
6565
solved = run_maze(maze, 0, 0, solutions)
6666
if solved:
67-
print("\n".join(str(row) for row in solutions))
67+
print((solutions,1))
6868
else:
69-
print("No solution exists!")
69+
print(([],0))
7070
return solved
7171

7272

0 commit comments

Comments
 (0)