Code problem for merge(test cases are not passing)

your code is correct good work

only change you have to do is
print ans of each testcase in different lines
use cout<<endl; after line 84

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

stiil not working,i have done cout<<endl; in the 85th line

actually the problem is at line no 55
what will happen if a->data== b->data
so use else here
see the modified Code

Modified Code