Can this question be explained a bit more?
Question not explained
Suppose you have input like this:
5
9 9 9 9 9
5
9 9 9 9 9
How will you approach this problem?
We have to do this question in such a manner that every cell of an array doesn’t go beyond number 9, if you will do so you will see
Cell 1 from right 9+9 = 18, 8 in cell . One in carry.
Cell 2 from right 1+9+9 = 19, 9 in cell . One in carry.
Cell 3 from right 1+9+9 = 19, 9 in cell . One in carry.
Cell 4 from right 1+9+9 = 19, 9 in cell . One in carry.
Cell 5 from right 1+9+9 = 19, 19 in cell . Array index ends.