You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Given a <em>m</em> x <em>n</em> grid filled with non-negative numbers, find a path from top left to bottom right which <em>minimizes</em> the sum of all numbers along its path.</p>
<p><strong>Note:</strong> You can only move either down or right at any point in time.</p>
<p><strong>Example:</strong></p>
<pre>
<strong>Input:</strong>
[
[1,3,1],
[1,5,1],
[4,2,1]
]
<strong>Output:</strong> 7
<strong>Explanation:</strong> Because the path 1→3→1→1→1 minimizes the sum.