One test case is failing. Can you please tell me where the code is going wrong?
Array-Sum of arrays
check for this input
here it is giving wrong ans
3
5 5 5
3
5 5 5
Yes, but can you tell me why? Is my logic wrong?
when you add these two nos then ans is correct but when you reverse it it wll not reverse
in this question if you are storing no in an array then no need to convert it into interger
best way to do this question is store the answer in array starting from k=0;
and at last print the array in reverse order
see this modified code
i hope this helps
if yes hit a like and donβt forgot to mark doubt as resolved 
if you have more doubts regarding this feel free to ask
1 Like