What is my mistake


here is the code

hi @hhiteshbansal_40d12e2460a1738e
I am checking your code

meanwhile you can give feedback on your previous 2 doubts that i have marked as resolved

doubt 1
doubt 2

i have checked your code
logic is correct , good work

only mistake you have done is you forgot to update head in main after deleting the node
do it like this
head = deletenode(head, f);

Modified Code

i hope now this doubt is also cleared

but even now test cases are failing why?

actually you have to print answer of each testcase in new line
so use endl

i have edit the above code you can check that
now this code is passing all testcases i have checked

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.

@hhiteshbansal_40d12e2460a1738e
u have reopened the doubt… is there still anything??

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.