Skip to content

Commit 3997fa6

Browse files
Merge pull request #16 from Pal-Sandeep/15-66-plus-one
Create 066_Plus_One.py
2 parents 8014241 + 54d155d commit 3997fa6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

066_Plus_One.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class Solution:
2+
def plusOne(self, digits: List[int]) -> List[int]:
3+
s=''
4+
for x in digits:
5+
s+=s.join(str(x))
6+
return [int(x) for x in str(int(s)+1)]

0 commit comments

Comments
 (0)