I am getting tle error

bool floydCycleRemoval(Node head)
{
Node
fast=head->next;
Node* slow=head;
while(fast!=NULL or fast!=NULL){
fast=fast->next->next;
slow=slow->next;
if(fast==slow){
slow=head;
while(fast->next!=slow->next){
fast=fast->next;
slow=slow->next;
}
fast->next=NULL;
return true;
}
}
return false;
}

please send the link of code