You are provided with a list of digits forming an integer (no leading zeros).
Return the resulting list after adding one to the represented integer.
If the addition causes a carry-over (like 999 + 1 = 1000), handle it properly.
Input: digits = [7,5,9]
Output: [7,6,0]
Explanation:
759 + 1 = 760
Input: digits = [9,9]
Output: [1,0,0]
Explanation:
99 + 1 = 100
Accepted:
Submission: