Skip to content

Instantly share code, notes, and snippets.

@konstunn
Last active September 17, 2019 15:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save konstunn/77d4ce0f6dbd61b15e700776f56fcd33 to your computer and use it in GitHub Desktop.
Save konstunn/77d4ce0f6dbd61b15e700776f56fcd33 to your computer and use it in GitHub Desktop.
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