Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Node *current1, *current2;
- current1=l.head;
- current2=l.head;
- while(current1!=NULL && current2!= NULL && current2->next!= NULL)
- {
- current1=current1->next;
- current2=current2->next->next;
- if(current1==current2)
- {
- return true;
- }
- }
- return false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement