Only some test cases are passing
code link:
Cycle detection and removal
hello @saxena.anukrati15

u r not increamenting slow and fast pointers in this loop.
update slow as
slow=slow->next;
fast=fast->next->next;
i tried it
code link: https://ide.codingblocks.com/s/264720
Time limit exceeded in most of the test cases
check ur updated code->
a) first we havr to perform updation in pointer and then compare (you were doing opposite)
1 Like
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.