if i m writing
while( fast->link!=NULL && fast!=NULL )
{
fast=fast->link->link;
slow=slow->link;
}
i m not getting ans when number of nodes is even but getting when number of nodes is odd .
but if i write
while(fast!=NULL && fast->link!=NULL)
{
fast=fast->link->link;
slow=slow->link;
}
i m getting right answers for both.
Can u explain WHY?