arrow_back Back to Challenges

#572 Minimum Path Sum

Medium Acceptance 0%
description

Problem Description

Given a `m x n` grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path. Note: You can only move either down or right at any point in time.

checklist Constraints

m == grid.length
n == grid[i].length
1 <= m, n <= 200
0 <= grid[i][j] <= 200

science Examples

Case #1

In: grid = [[1,3,1],[1,5,1],[4,2,1]]
Out: 7

Case #2

In: grid = [[1,2,3],[4,5,6]]
Out: 12

Mastery Tags

Arrays Dynamic Programming Matrix

Hiring Companies

Amazon Goldman Sachs Google
code

Integrated IDE

code_blocks
Coding
psychology
Aptitude