Skip to content

Commit a34c1a8

Browse files
committed
Day 5
Plus one on Array of element and recreate array
1 parent e385f99 commit a34c1a8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

day_5_plus_one.py

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

0 commit comments

Comments
 (0)