what we have to do with the given arrays i.e how we have to add the arrays.
Array-Sum of Two Attays
Hello @Debugger,
Consider the addition of arrays as the sum of two numbers that you have learnt in mathematics.
Let’s understand this with the help of the sample input given in the question:
4
1 0 2 9
5
3 4 5 6 7
for once, consider these array as two numbers: 1029 and 34567.
Now adding these two the way you do in maths:
1029+34567= 35596
Thus, the output is:
3, 5, 5, 9, 6, END (This is just the output format that can be easily created using count statements)
Note:
So, you have to add the elements at the rightmost index of both arrays with array and then gradually move toward left side.
Please, use a variable to keep track of the carry also.
Hope, this would help.
Give a like if you are satisfied