Related to deletion in linked list

sir why we do not need to pass head by reference in delete function

hello @avverma11057

its upto implementation, here in the deletion function that bhaiya wrote is returning nothing, so if head get deleted during deletion then we need to update our head and that why we are passing it as refrence (read about pass by refrence and pass by value), if we dont pass by refrence then we will lost the newly updated head becuase head root in function and head node in main function will be different

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.