```
class Solution(object):
def plusOne(self, digits):
"""
:type digits: List[int]
:rtype: List[int]
"""
forward = 1
for i in range(len(digits))[::-1]:
forward, digits[i] = (digits[i] + forward) / 10, (digits[i] + forward) % 10
if forward == 0:
return digits
return [forward] + digits
```