Hello and welcome to the challenge!
Write a code which increments a number given in the form of array of digits and returns it in the same form.
Examples
solve([9,9,9,9]) -> [1,0,0,0,0]
Input
- an array with digits
Output
- the given array including digits of incremented number
Constraints
0 < length of the given array < 100
You can solve this programming contest in Ruby, JavaScript, Python and other languages. If you want, you can also take part in other Challenges. Below you can find some of them:
Have fun and good luck! :)