Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2435. Paths in Matrix Whose Sum Is Divisible by K
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.
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.