i am not getting correct output
please help
I have to delete all the occurences of the given key from linked list
why this return statement?
remove it
removed but it is still not working
what test case u r giving
it is failing for all the test cases
only the element at the head is printed
here it should be
tail->next=n;
for input 12422 -1 2
output is coming 1422
u are deleting ur temp whenever its data matched with key.
so this statement
will become invalid. because temp is already deleted.
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.