node *floydAlgo(node *head){
    node *slow = head;
    node *fast = head;
    node *curr = fast;
    node *prev = NULL;
    node *n;
    node *temp;
    while (fast!= NULL || fast->next!=NULL){
        fast = fast->next->next;
        slow = slow->next;
        if (fast == slow){
            temp = tail;
            slow = head;
            break;
        }
    }
   
        while(fast != slow)
            {
            temp=temp->next
            slow = slow->next;
            curr =temp;
            n= curr->next;
            c->next = prev;
            prev= curr;
            curr=n;
        }
            prev= NULL;
    }