Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 576. Out of Boundary Paths
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source