Increment An Array Of Digits Medium

+100 PTS

Before you start the test, check out our tutorial challenge

  • TYPE CODE PRACTICE CHALLENGE
  • LANGUAGES JAVASCRIPT, PHP, PYTHON2, PYTHON AND 3 MORE
    LANGUAGES JAVASCRIPT, PHP, PYTHON2, PYTHON, RUBY, SWIFT, TYPESCRIPT
  • TIME ~60MIN

Increment An Array Of Digits

Challenge outline

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 September 2019 competitions. Below you can find some of them:



Have fun and good luck! :)