81. Minimum Path Sum in a Grid
MediumDynamic programming
Moving only right or down, return the smallest possible sum of a path from the top-left to the bottom-right of grid.
Example 1
Input: grid = [[1, 3, 1], [1, 5, 1], [4, 2, 1]] Output: 7 Explanation: 1 → 3 → 1 → 1 → 1
Constraints
1 ≤ rows, columns ≤ 200Values are non-negative