Concept Flow - Rat in a Maze Problem
Start at maze[0
Check if current cell is safe
Yes
Mark cell as part of path
Try move Down
→If path found
Try move Right
→If path found
Backtrack: Unmark cell
Return False if no moves work
End
The rat starts at the top-left cell and tries to move right or down if the cell is safe, marking the path. If stuck, it backtracks and tries other paths until it reaches the bottom-right cell or exhausts options.
