Minimum Path Sum

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

Input / Output

  • Input: m × n grid of non-negative integers.
  • Output: the minimum possible path sum.

Constraints

  • 1 ≤ m, n ≤ 200.

Example

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