Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1301. Number of Paths with Max Score
Given an n×n board with digits, obstacles 'X', start 'S' (bottom-right) and end 'E' (top-left), find the maximum sum of digits collectible moving only up, left, or up-left and the number of distinct paths that achieve that maximum (mod 1e9+7). This is a DP problem where each cell tracks the best sum reachable and the count of ways to reach that best sum, returning [maxSum, count] or [0,0] if unreachable.
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.