Last active
September 17, 2019 15:40
-
-
Save konstunn/77d4ce0f6dbd61b15e700776f56fcd33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution: | |
def plusOne(self, digits: List[int]) -> List[int]: | |
s = "".join([str(d) for d in digits]) | |
i = int(s) | |
i = i + 1 | |
s = str(i) | |
return [int(si) for si in s] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment