33,008
社区成员
发帖
与我相关
我的任务
分享
bool CheckCircle( const node *head)
{
if(head == null) return false;
node *low = head;
node *fast= head->next;
while(fast!=null && fast->next!=null)
{
low = low->next;
fast = fast->next->next;
if(low == fast)
return true;
}
return false;
}