Dynamic-Programming : remove live code & console.log, leave examples as comments.

This commit is contained in:
Eric Lavault
2021-10-10 17:00:21 +02:00
parent 449ef45193
commit 29d2a84090
14 changed files with 95 additions and 124 deletions

View File

@ -26,21 +26,19 @@ const minCostPath = (matrix) => {
return moves[n - 1][m - 1]
}
const main = () => {
console.log(
minCostPath([
[2, 1],
[3, 1],
[4, 2]
])
)
console.log(
minCostPath([
[2, 1, 4],
[2, 1, 3],
[3, 2, 1]
])
)
}
export { minCostPath }
// Example
// minCostPath([
// [2, 1],
// [3, 1],
// [4, 2]
// ])
// minCostPath([
// [2, 1, 4],
// [2, 1, 3],
// [3, 2, 1]
// ])
main()