mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 00:01:37 +08:00
feat(ZeroOneKnapsack.js): Fixed bad code
This commit is contained in:
@ -50,10 +50,9 @@ const main = () => {
|
||||
arr.push(input[j])
|
||||
j++
|
||||
}
|
||||
const newArr = []
|
||||
arr.map(e => {
|
||||
newArr.push(e.trim().split(' ').map(Number))
|
||||
})
|
||||
const newArr = arr.map(e =>
|
||||
e.trim().split(' ').map(Number)
|
||||
)
|
||||
const cache = []
|
||||
for (let i = 0; i <= currlen; i++) {
|
||||
const temp = []
|
||||
|
Reference in New Issue
Block a user