Skip to content

Commit

Permalink
Created 66-Plus-One
Browse files Browse the repository at this point in the history
  • Loading branch information
loczek committed Jul 8, 2022
1 parent 9b2e781 commit 975fbe1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions typescript/66-Plus-One.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function plusOne(digits: number[]): number[] {
return (BigInt(digits.join("")) + BigInt(1))
.toString()
.split("")
.map((item) => Number(item));
}

0 comments on commit 975fbe1

Please sign in to comment.