So i created insertinmiddle() function for my linked list and in that if that position at which i want to insert the element is 0 , then i defined it separately using temp inside this function
But when i am printing the first element newly inserted does not show up however if i replace temp with head , the new element shows up
why this happens ?
because isn’t temp behaving same like head as i have taken pass by reference like for other positions ?