Merge two sorted linked lists

I’m facing issues while compiling the code.


here is my code reference

hi @dips123deepali_c25f140838182212
ur code was not complete…
refer this -->

I’m still getting errors in the code.

hi @dips123deepali_c25f140838182212
its working fine…
see the input format in ques…

1   // no of test cases
4   //size of first linked list
1 3 5 7 // first linked list nodes
4  //size of second linked list
2 4 6 8  //second linked list nodes

its giving correct ans for this sample input

hi @dips123deepali_c25f140838182212
i hope its clear now??

Yeah ,Its clear now. can you please explain the approach of input at tail.

When we have to insert at tail, all we have to do is maintain a temp pointer, move it till the end of linked list and then insert the node node… that’s all

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.