CPP-Linked List Insertion in middle

when we check for the condition If(head==NULL) in insertatmiddle( ) function then we call for insertathead( )

when we check in insertattail( ) fiunction then we create head=new node(data)

can we call for insertathead( ) in place of creating new node of heas?

yeah in case your head is NULL at start you can call insertathead() as it will make head=new node(d)
but not in case your linked list already contains some nodes

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.