Floyd cycle code

check line number 205 is my function correct for removal and detection of loop

@ranahiten8 you are missing the corner case when the slow and fast pointers both meets on head
to work with this case
you just maintain a previous pointer to slow and check if the slow and fast are both equal to head then make prev->next==NULL
and if this is not the case then your code will work fine

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.

is it fine now