Loading problem…
Given a rectangular grid of nonnegative integers, return the smallest sum of cell values along a route from the top-left to the bottom-right. You may move only right or down, and both endpoint values count.
You may reuse grid to store intermediate results; preserving the original values is not required. Return the minimum sum as a number.
Example 1:
Example 2:
Example 3: