Doubt On liked ist

is there a difference between tail!=NULL and tail->next!=NULL.
for ex. in loop
while(tail!=NULL){
}
and
while(tail->next!=NULL){
}

See you can’t traverse back on linked list, right? So what we do in next->tail != NULL is to see that whatever next node is, is it my last node or not. If it is, then i would insert node on its tail else would find it by traversing it. Have any other doubts related to this, ask me here.

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.