

Let input array is [1,3,2,7] so basically, this array represents the number 1327, the output will be [1,3,2,8].
The input may have 0 at the starting of the array, e.g., [0,3,5,7] is a valid input, but the output can not have 0 before the most significant digit. So [0,3,5,8] will be a wrong answer, and the correct answer will be [3,5,8].
The first line of input contains a single integer T, representing the number of test cases.
Then the T test cases follow.
The first line of each test case contains a number N denoting the size of the array.
The second line contains N space-separated distinct integers denoting the array elements.
For each test case, print the output array elements are separated by space.
The output of every test case will be printed in a separate line.
You don’t have to print anything. It has already been taken care of. Just implement the given function.
1 <= T <=10^2
1 <= N <=10^4
0 <= NUM[i] <= 9
Where 'N' is the number of elements in array 'NUM' and 'NUM[i]' represents the ith digit of number 'NUM'.
Time limit: 1 second
We can update values by making a recursive algorithm.
As we have to start adding from the least significant digit so we have to start adding 1 from the end. Along with this, we will keep an integer variable CARRY initialized to 1. Now at each digit set digit to digit+CARRY then CARRY will be equal to (digit)/10 and the digit will become (digit)%10.