Skip to content

Commit

Permalink
feat(2023): update solution for challenge #23
Browse files Browse the repository at this point in the history
  • Loading branch information
iswilljr committed Dec 23, 2023
1 parent 4c7f397 commit d04e4de
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions 2023/challenge-23/challenge-23.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ export function organizeChristmasDinner(dishes: string[][]) {
}
}

const filteredIngredients = [...ingredients.entries()].filter(
([, dishes]) => dishes.length >= 2,
)

const organizedDishes = filteredIngredients
const organizedDishes = [...ingredients.entries()]
.filter(([, dishes]) => dishes.length >= 2)
.map(([ingredient, dishes]) => [ingredient, ...dishes.sort()])
.sort()

Expand Down

0 comments on commit d04e4de

Please sign in to comment.