Sum of two arrays code


I am having some test cases error

You have to add the two arrays just like you would add two numbers. When you perform addition on numbers you have to start adding from the end, not the front. Moreover, there maybe a carryover also, so you have to take care of adding the carryover to the next set of elements. And the size of the resultant array could be greater than max of sizes of array1 and array2 if there is a carryover in the end. So, consider using an arraylist for that.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.