Minimum Path Sum

Problem Given an m x n grid of non-negative numbers, find the minimum-sum path from the top-left to the bottom-right cell, moving only right or down.

Input / Output

  • Input: an m x n integer grid.
  • Output: the minimum path sum.

Constraints

  • 1 ≤ m, n ≤ 200.
  • Moves restricted to right and down.

Example

  • [[1,3,1],[1,5,1],[4,2,1]] → 7 (path 1→3→1→1→1)
added …
LeaderboardSalaryAccount