Can you please tell me what is the problem in my code?

It is showing segmentation fault error while submitting.

hey ignore above post, i thought its append problem wait let me check again

I want to confirm that is it possible that any element in input array can be more than one digit?
For eg can this be an input :
Array 1: 2 3 4 456
Array 2: 4 5 3 1
If not then, I think in the worst case we will have max(m,n)+1 digits and I have already taken m+n digits in the resultant array. So there is some other problem.

yeah it is true , in worst case u will have not more than max(n,m)+1 digits

Is it possible that any element in input array can be more than one digit?
For eg can this be an input :
Array 1: 2 3 4 456
Array 2: 4 5 3 1

ur code is working fine on my side.

pls referesh ur tab , and try to submit again

no always a single digit will be given

I don’t know what is the problem. While compiling it is showing segment fault but while submitting it is passing all test cases.

at the time of compiling u need to give ur own input otherwise it will give seg fault

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.