Concept Flow - Rat in a Maze Problem
Start at (0,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
End: Path found or no path
The rat starts at the top-left cell and tries to move right or down if the cell is safe. It marks the path and backtracks if stuck, until it finds the exit or exhausts all options.
