Search
⌘K
Get Premium
Leetcode 576. Out of Boundary Paths
Count the number of sequences of at most maxMove moves that take a ball from a start cell to outside an m×n grid by moving one step in four directions, returning the result modulo 10^9+7. This is typically solved with dynamic programming (or DFS + memoization) over steps and grid positions given constraints m,n,maxMove ≤ 50.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.