Linked List Searching

i have understood linked list really well but i am not understanding one thing when to pass head by value and when to pass it by reference

hello @jatinupadhyay786

when u want to make changes in the same node then pass it by reference.
otherwise pass it by value .
when we pass any object by value. a new copy get created due to which whatever changes will not get reflected on original object.