Concept Flow - Rat in a Maze Problem
Start at (0,0)
Check if current cell is safe
Yes
Mark cell as path
Try move Right
Recurse
Recurse
If at destination
Print path and return
Backtrack if no moves
End
The rat starts at the top-left cell, checks if it can move right or down safely, marks the path, and recursively explores until it reaches the destination or backtracks if stuck.
