Given an array of positive numbers, write a method, that "adds one" to the "number" represented by the array, like an odometer.
Input:
[4, 3, 9, 5]
Output:
[4, 3, 9, 6]
Input:
[4, 3, 4, 9]
Output:
[4, 3, 5, 0]
Input:
[9, 9, 9, 9]
Output:
[1, 0, 0, 0]
- The array will always be positive integers
- You must modify the array IN PLACE
- You will need to code the reverse method as well as the odometer logic