A rat begins initially at (0, 0), or maze[0][0], and it wants to eat food that is present at some specific block in the labyrinth. The maze is presented as a N*M binary matrix of blocks (fx, fy).
A rat begins initially at (0, 0), or maze[0][0], and it wants to eat food that is present at some specific block in the labyrinth. The maze is presented as a N*M binary matrix of blocks (fx, fy).
In a labyrinth matrix, 0 indicates a dead end and 1 indicates a block that can be used to travel from one place to another. If a block is not a dead end, the rat can move to any block in any direction (but not diagonally).
The task is to determine whether there is a path that the rat can use to get to the food or not. The path does not have to be printed.
To know more about binary click here:
https://brainly.com/question/29346974
#SPJ4