Maximal Rectangle: [LeetCode] 576. Out of Boundary Paths
There is an m by n grid with a ball. Given the start coordinate (i,j) of the ball, you can move the ball to adjacent cell or cross the grid boundary in four directions (up, down, left, right). However, you can at most move N times. Find out the number of paths to move the ball out of grid boundary. The answer may be very large, return it after mod 109 + 7.
Read full article from Maximal Rectangle: [LeetCode] 576. Out of Boundary Paths
No comments:
Post a Comment