mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2026-03-13 08:51:02 +08:00
Upgrade dependencies and fix ESLint issues.
This commit is contained in:
@@ -7,7 +7,7 @@ export default function combineWithRepetitions(comboOptions, comboLength) {
|
||||
// If the length of the combination is 1 then each element of the original array
|
||||
// is a combination itself.
|
||||
if (comboLength === 1) {
|
||||
return comboOptions.map(comboOption => [comboOption]);
|
||||
return comboOptions.map((comboOption) => [comboOption]);
|
||||
}
|
||||
|
||||
// Init combinations array.
|
||||
|
||||
@@ -7,7 +7,7 @@ export default function combineWithoutRepetitions(comboOptions, comboLength) {
|
||||
// If the length of the combination is 1 then each element of the original array
|
||||
// is a combination itself.
|
||||
if (comboLength === 1) {
|
||||
return comboOptions.map(comboOption => [comboOption]);
|
||||
return comboOptions.map((comboOption) => [comboOption]);
|
||||
}
|
||||
|
||||
// Init combinations array.
|
||||
|
||||
@@ -150,7 +150,6 @@ export default class Knapsack {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Solve unbounded knapsack problem.
|
||||
// Greedy approach.
|
||||
solveUnboundedKnapsackProblem() {
|
||||
|
||||
@@ -8,7 +8,7 @@ export default function permutateWithRepetitions(
|
||||
permutationLength = permutationOptions.length,
|
||||
) {
|
||||
if (permutationLength === 1) {
|
||||
return permutationOptions.map(permutationOption => [permutationOption]);
|
||||
return permutationOptions.map((permutationOption) => [permutationOption]);
|
||||
}
|
||||
|
||||
// Init permutations array.
|
||||
|
||||
Reference in New Issue
Block a user