Original linked list is getting replaced?

HI please check the merge function in th eabove code, using that function if i merge two LL then the both original LL also gets changed , i m not understanding why teh happens , pls help.

Hey @thakur0_0
So Linked List is basically collection of node class objects joined using next pointer

Now what we do in merge is we change next pointers of the nodes which means breaking the old bonds , hence they are changing