Minimum Path Sum Problem
Minimum Path Sum Problem — ExecCode Medium DSA Practice
Solve the Minimum Path Sum problem on ExecCode. Free online medium DSA practice in DP. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Given an m × n grid filled with non-negative numbers, find a path from the top-left to the bottom-right that minimizes the sum of numbers along the path. You may only move right or down at each step.
Examples
Input grid = [[1, 3, 1], [1, 5, 1], [4, 2, 1]]; Output 7. Input grid = [[1, 2, 3], [4, 5, 6]]; Output 12
Constraints
1 ≤ m, n ≤ 200 0 ≤ grid[i][j] ≤ 100
Practice Minimum Path Sum free on ExecCode. Browse DSA problems, topic map, and placement guides.