in the insertattail() function we made a condition if(head==null){ head= new node(data); return;}
why didn’t we intialize the next pointer to null i.e. head->next=null;
Next pointer to the null
@jindaldivish sorry for the delay
when you write new node the default node constructor will get called which will automatically set next as null