Sum of two Arrays


My code is not passing two test cases. Kindly provide me a better code highlighting my mistakes.

Hey @yash_aryan lets make this code better by highlighting your mistake. See for test case
5
9 9 9 9 9
4
9 9 9 9
Answer should be : 109998
Yours is giving : 09998
Just handle the last carry and your code will pass all test cases.
If you are unable to pass it do let me know I’ll help you. But give it a try.


It’s still not passing the test cases. Kindly help me with a better code.

Okay you can take reference from this code. There are few comments in it too. Which will help you in understanding this problem better


If you don’t understand anything or have any other doubts left, feel free to aks.

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.