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

function to check if link list has cycle #2926

Merged
merged 2 commits into from
Nov 7, 2017
Merged

Conversation

ayush94
Copy link

@ayush94 ayush94 commented Oct 31, 2017

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

Copy link
Member

@arnavb arnavb left a 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
Copy link
Member

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.

Copy link
Contributor

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

Copy link
Member

Choose a reason for hiding this comment

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

@deesims A quick google search, along with documentation, confirms this. Here is also an example in Python 3. Here is one in Python 2.

Copy link
Contributor

@deesims deesims Nov 5, 2017

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 👯

@arthurlacoste
Copy link
Contributor

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:

/* Part of Cosmos by OpenGenus Foundation */

@arnavb
Copy link
Member

arnavb commented Nov 6, 2017

@arthurlacoste The comment you mentioned is no longer necessary, and @AdiChat should update the contributing guidelines based on that.

@AdiChat
Copy link
Member

AdiChat commented Nov 7, 2017

Looks great 😍

Hope you are enjoying your journey 🚆 with OpenGenus

@AdiChat AdiChat merged commit f267e59 into OpenGenus:master Nov 7, 2017
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.

6 participants