Skip to content

Commit

Permalink
fix: Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelriosoliveira committed Jan 16, 2024
1 parent db08b90 commit 5b1ab4a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/2023/324-lexoNext/lexoNext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ Example:

// thanks to https://www.w3resource.com/javascript-exercises/fundamental/javascript-fundamental-exercise-136.php
function getPermutations(str: string): string[] {
return str
.split('')
.reduce<string[]>(
(acc, letter, i) =>
acc.concat(getPermutations(str.slice(0, i) + str.slice(i + 1)).map(val => letter + val)),
[str],
);
return str.split('').reduce<string[]>(
(acc, letter, i) => {
return acc.concat(
getPermutations(str.slice(0, i) + str.slice(i + 1)).map(val => letter + val),
);
},
[str],
);
}

export function lexoNext(n: number): number {
Expand Down

0 comments on commit 5b1ab4a

Please sign in to comment.