Algorithm · Oracle · Easy
Read an integer n, then read an array digits of n integers, each from 0 through 9. The array stores the decimal digits of a non-negative integer, with digits[0] acting as the most significant stored digit. Add one to the represented value and print the updated digits in order, separated by spaces. Implementation rules: Do not use Java ArrayList or any dynamically resizing collection. Work with a fixed-size array and allocate a new array only when a carry creates an…
Checking your access…