There is a ball in an m n maze consisting of empty spaces represented by
Given the m n grid maze, the initial position of the ball start startstartdestination destinationdestinationdestination. If it is impossible for the ball to stop at the destination, return
The distance is measured by the total number of empty spaces traveled from the start position to the destination.
Constraints:
m maze.length
n maze[i].length
m, n
maze[i][j] is
start.length
destination.length
startdestinationm
startdestinationn
Both the ball and the destination exist in an empty space, and they will not be in the same position initially.
The maze contains at least
There is a ball in an m n maze consisting of empty spaces represented by
Given the m n grid maze, the initial position of the ball start startstartdestination destinationdestinationdestination. If it is impossible for the ball to stop at the destination, return
The distance is measured by the total number of empty spaces traveled from the start position to the destination.
Constraints:
m maze.length
n maze[i].length
m, n
maze[i][j] is
start.length
destination.length
startdestinationm
startdestinationn
Both the ball and the destination exist in an empty space, and they will not be in the same position initially.
The maze contains at least