Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added linkedListCycle #10

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

added linkedListCycle #10

wants to merge 4 commits into from

Conversation

rohinmanvi
Copy link
Contributor

No description provided.

nodeTwo = nodeTwo.next;
if (!nodeTwo) return false;
nodeTwo = nodeTwo.next;
if (nodeOne === nodeTwo) return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment explaining why this line must eventually be true if the list has a cycle.

@Shreshth3 Shreshth3 force-pushed the main branch 2 times, most recently from e286181 to d69c4be Compare June 9, 2022 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants