Cycle detection


i this question i dont understand where i am wrong

Hello Satyam, In line 35 put slow=head instead of ==.

i am passing only 8 test cases out of 11

if(fast->next==head){
fast->next=NULL;
return true;
}
remove this part as this condition is already taken care of by Floyd’s algorithm.

i removed that part but still i am not passing all the test case.Now i passed 9 test cases


passes all tests, put or condition instead of and in line 21