LeetCode Day #18 -Minimum Path Sum
Published in
1 min readApr 20, 2020
Problem — https://leetcode.com/explore/challenge/card/30-day-leetcoding-challenge/530/week-3/3303/
Intuition
at every index(i,j) we have to choices either go right or down.
Clearly a optimal subproblem solution,
first try to implement using recursion, then easily convert to Top-down Dynamic programming.
findSum(i,j) = grid[i][j] + min( findSum(i,j+1),findSum(i+1,j));
Solution