Do I need to add about if head is NULL or Tail is NULL for Deletion At mid.
OR prev->next=temp->next; is fine ??
Linked List Deletion at Mid
hi @ashwani225 you dont need to check a pointer that you are not using, but you must ALWAYS check for the pointer that you are going to use directly, for eg if you are doing the operation prev->next=temp->next;
then you must ensure that tail is not NULL (because if it is NULL then you cant access NULL->next and you must ensure that temp is not NULL, for similar reasons)
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.