give m x n grid fill nonnegative number find path leave right minimize sum number pathnote you right point time Example 1input grid 131151421output 7explanation because path 1 3 1 1 1 minimize sumExample 2input grid 123456output 12 Constraintsm gridlengthn gridilength1 m n 2000 gridij 100