Remove of the loop in the linked list

I didn’t get it how to remove the cycle can u explain little bit?

Although I get the intuition of how to find out the first elements of the loop but didn’t get the mathematical proof part of the Algorihtms ?


in this method 3 can explain u best with mathematical proof

while (slow_p && fast_p && fast_p->next) what is the meaning of this line of code while True is should also works ??

this actually when expanded would look like

while(slow_p != NULL and fast_p != NULL and fast_p->next != NULL) {}
so till the time either of the three pointer do not become NULL till that time while loop will run

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.