// Problem Statement => https://www.youtube.com/watch?v=lBRtnuxg-gU const minCostPath = (matrix) => { /* Find the min cost path from top-left to bottom-right in matrix >>> minCostPath([[2, 1], [3, 1], [4, 2]]) >>> 6 */ const n = matrix.length const m = matrix[0].length // moves[i][j] => minimum number of moves to reach cell i, j const moves = new Array(n) for (let i = 0; i < moves.length; i++) moves[i] = new Array(m) // base conditions m