-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
function to check if link list has cycle #2926
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to look at the Python Style Guide!
while slow is not fast: | ||
slow = slow.next | ||
fast = fast.next.next | ||
return true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Python, true and false are capitalized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
teehee did u test it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i was asking @ayush94 if he tested it, clearly 'true' doesnt parse in python compiler 👯
Don't forgot to read the contribution guidelines 😄 Naming convention: folders and filenames should be in lowercase and each word separated by _. Names should be descriptive to certain extend. 👍 Every code contribution may contain the following comment as a part of it:
|
@arthurlacoste The comment you mentioned is no longer necessary, and @AdiChat should update the contributing guidelines based on that. |
Looks great 😍 Hope you are enjoying your journey 🚆 with OpenGenus |
Adds functionality #2921
Changes:
a python file added under link_list code that defines a function to check whether a link list has a cycle or not