Skip to content

Commit 8bc8f8c

Browse files
authored
Update rat_in_maze.py
Fixes TheAlgorithms#9066 Backtracking/Rat Maze TheAlgorithms#9066 I have made updates to the rat_in_maze.py file to resolve the bug to create expected output by returning (solutions,1) as tuple
1 parent dec9643 commit 8bc8f8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: backtracking/rat_in_maze.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ 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:
6969
print("No solution exists!")
7070
return solved

0 commit comments

Comments
 (0)