Test case # 3 coming wrong and 1. 2 and 4 test cases are right.
Challenges-- Arrays Sum of two arrays
Please find the link for debugging
else if(carry>0){
List.add(0,carry); }
Just change your last “else” to this “else if” condition. The carry would be added to the beginning of the arraylist only if it is > 0
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.