Available question text
Count the number of down/right paths from the top-left to bottom-right of a grid whose path-sum is divisible by k, returning the result modulo 1e9+7.
This requires dynamic programming that tracks, at each cell, counts of paths for each sum remainder mod k (k ≤ 50), yielding an O(m·n·k) solution.
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 2435. Paths in Matrix Whose Sum Is Divisible by K
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source