int isLoop(LinkList *L){ LinkList *fast,*slow; fast=slow=L; while (fast!=NULL&&fast->next!=NULL) { fast=fast->next->next; slow=slow->next; if (fast==slow) { return 1; } } return 0;}