Minimum path sum in matrix
Given a matrix M, write a function to find the minimum sum of all numbers encountered on the path moving from the top left to the bottom right of the matrix. You are only allowed to move down or to the right at each step, and your matrix will be filled with non-negative numbers.
M = [[1, 2, 3], [4, 1, 2], [1, 5, 3]] # Returns 9 because we go from 1 -> 2 -> 1 -> 2 -> 3 = 9
Subscribe to premium account to see the solution.Get premium now