DELETION IN LINKED LIST AT THE END AND THE MIDDLE OF THE LINKEDLIST

https://ide.codingblocks.com/s/397364,

Kindly check my code for the deletion in the linkedlist at the end and in the middle.
take comments in consideration.

Hello @CODER_JATIN please wait i am checking your code:

Hello @CODER_JATIN i think you have to explain me your logic we need to discuss because i have got your logic but your implementation is quite wrong.
and you have just made it complex by doing inthis way.
please explain here:
Happy Learning!!

okay, now how would you suggest me to do this?

for removing the last element of the linkedlist

https://ide.codingblocks.com/s/397428 , kindly check my this code also , in this code my deleteattail() function is not working, kindly chcek that function do let me know?

you can just traverse the linked list with condition in while loop that you should run till temp->next->next!=NULL and after the while loop gets over you can mark the temp-.next=NULL to remove element from last.

Hello @CODER_JATIN i have updated your whole code :
like there were two mitakes in middle and in tail.
i have commented the mistakes you can check.


Happy Learnign!!

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.