if sample input is:-
4
1 0 2 9
5
3 4 5 6 7
then
output should be
4, 4, 7, 15, 7
but given
3, 5, 5, 9, 6, END
Arrays-sum of two arrays
Imagine the two arrays as two decimal numbers and then add them from their rightmost digits with carry over addition. You would get the correct answer
1 Like