Plus One
Easy · Math & Number Theory · about 10 minutes
Asked at Google, Meta, Amazon, Microsoft, Bloomberg, Apple, Sony.
A large non-negative integer is given as an array of its digits, most significant first, with no leading zeros (except the number 0). Return the digits of the integer plus one.