Python simple solution using recursion
def plusOne(self, digits):\n        """\n        :type digits: List[int]\n        :rtype: List[int]\n        """\n        if len(digits) == 0:\n            digi
    def plusOne(self, digits):\n        """\n        :type digits: List[int]\n        :rtype: List[int]\n        """\n        if len(digits) == 0:\n            digits = [1]\n        elif digits[-1] == 9:\n            digits = self.plusOne(digits[:-1])\n            digits.extend([0])\n        else:\n            digits[-1] += 1\n        return digits
[]