An m $ imes$ n grid contains a ball initially located at coordinate (startRow, startColumn). In each step, you can move the ball to one of the four adjacent cells: up, down, left, or right. A move can also take the ball past the edge of the grid.
Given the integers m, n, maxMove, startRow, and startColumn, return the number of distinct paths to move the ball off the boundary of the grid using at most maxMove moves. Since the answer can be very large, return it modulo
Constraints:
m, n
maxMove
startRow m
startColumn n
An m $ imes$ n grid contains a ball initially located at coordinate (startRow, startColumn). In each step, you can move the ball to one of the four adjacent cells: up, down, left, or right. A move can also take the ball past the edge of the grid.
Given the integers m, n, maxMove, startRow, and startColumn, return the number of distinct paths to move the ball off the boundary of the grid using at most maxMove moves. Since the answer can be very large, return it modulo
Constraints:
m, n
maxMove
startRow m
startColumn n