JavaScript:实现MinimumCostPath最小成本路径算法
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