Upgrade dependencies and fix ESLint issues.

This commit is contained in:
Oleksii Trekhleb
2020-07-26 13:06:15 +02:00
parent 4d8baf87db
commit 63f5a27152
36 changed files with 4442 additions and 1630 deletions

View File

@@ -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.

View File

@@ -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.

View File

@@ -150,7 +150,6 @@ export default class Knapsack {
}
}
// Solve unbounded knapsack problem.
// Greedy approach.
solveUnboundedKnapsackProblem() {

View File

@@ -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.