what’s going wrong in my code.??
Sum of 2 arrays
@sounakume Consider input:
3
5 5 5
3
5 5 5
your code’s output:
1, 1, 0, END
but the expected output is:
1, 1, 1, 0, END
Make sure your code handles different cases of carry.
Here I have handled the following cases as u can see in ss. But still not passing. What am I missing still?
I am getting expected output with my code. But 2 of my cases are failing.
@sounakume I found some more cases for which your code is failing. Check and try to correct considering these cases:
3
1 2 3
4
9 8 7 6
Your Output:
0, 9, 9, 9, 9, END
Expected Output:
9, 9, 9, 9, END
And
1
1
1
1
Expected Output:
2, END
Ok done, but how do i imagine so many test cases. How do you do this bro?
Don’t worry. By practicing more and more you will be able to think about different edge cases.
I would suggest you to practice on other platforms also like Leetcode along with your course. That will help. There the failed test cases would be shown to you.
Yes I have started practising on leetcode. Doing easy problems now.
