Some test cases are not correct

@aryanraj
Hello Aryan,
a) your temp array size can be greater than max(n,m) for cases like
5
9 9 9 9 9
5
9 9 9 9 9
b)why cout statement in line no 30

give me solution of this problem

@aryanraj
Hello aryan,
checkout this solution https://ide.codingblocks.com/s/178102

also while replying to thread tag me using @ symbol otherwise it will not give notification

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.