Linked List Merge two lists

can you tell me whats the mistake?

hello @rohit267
a)
declare ur head1 and head2 inside while loop.

not working and the live chat is also not working

@rohit267
see after calling merge function u are not receiving the updated root node.
image

it should be
head=merge(head,head2);

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.