why we run the loop for slow and fast pointer till the given condition it was not explained in the video
while(slowptr && fastptr && fastptr->next)
Cycle detection in linked list
if there is a cycle in any format not specifically in Link list
if we move at 2x and someone move at x
then we will definety meet at a point
this is used to check the cycle is present or not
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.