mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-04 07:29:47 +08:00
Dynamic-Programming : remove live code & console.log, leave examples as comments.
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user