Help with error

First break the linked list, then it will be single linked list. After that delete last two nodes. Breaking a cycle in linked list doesn’t mean to delete elements in linked list. Breaking cycle means you are converting circukar linked list into single with all the elements present in circular as well as single linked list.

but it won’t be a generic solution then?

Tell me the operation you want to do on a circular linked list. If possible explain it by drawing or explain in detail.

I just want to delete the duplicate nodes, in the explanation of the question it is said that the 5 is pointing to 2 but this is not the case instead 3 is pointing to 2.

Run this code for two input
1,2,3,4,5,-1
And
1,2,3,4,5,2,3,-1


Still not able to understand. Ask me here.

yeah this much is understood

And now see the number you are saying that delete 2 & 3 as they are repeating, instead of 2 & 3 right anything else. Write 8 & 9. And output will still be the same.

Also of it’s still not clear, tell me the name of whatsapp group you are added in of CB. Will ping you and would try to solve your doubt on meet.

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.