Problem Submissions Solution

Minimum Path Sum

Difficulty: Medium

Acceptance: %

Points: 30.00

Given a n 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.

Topics

Companies

Articles

Examples:

Expected Time Complexity: O(n^2)

Expected Auxiliary Space: O(n^2)

Constraints:
  • n == grid.length, grid[i].length
  • 1 <= n <= 200
  • 0 <= grid[i][j] <= 200
Companies:
Amazon Microsoft Samsung Goldman Sachs
Topics:
Array Dynamic Programming 2D Array
Locked Content
Access Restricted: Please Login to access the code editor and test cases.