plz tell what is wrong in this
Circular link list
Hi @ashigupta.gupta570
In your code you are just building linked list from the given input till you encounter -1, but in this question while taking input you need to form a loop. For example when input is 1 2 3 4 2 3 -1 then you need to make linked list such hai after forming node with data 4 when you encounter 2 and see that it already exist in the linked list then you need to do 4->next = 2; and from there stop taking more input. And then call for function to remove the loop.
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.