#897 cycle detection in linked list #910
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Given the
head
of a linked list, determine if the linked list contains a cycle. A cycle exists if a node in the list points back to an earlier node, creating a loop in the list. Internally, a variablepos
represents the index of the node that the tail'snext
pointer is connected to. If there is no cycle,pos
is-1
.Pull Request for PyVerse 💡
#897
Requesting to submit a pull request to the PyVerse repository.
Issue Title Addition of
Addition of Detection of Cycle in Linked List
Info about the Related Issue
What's the goal of the project?
It is python code to detect cycle in Linked List.
Describe the aim of the project.
I have use slow and fast pointer to test for cycle in the list
Name
Sanat Kumar Gupta
GitHub ID
@SKG24
Enter your GitHub ID here.
Email ID
Please mention your email ID for further communication.
gupta.sanat24@gmail.com
Identify Yourself
Mention in which program you are contributing (e.g., WoB, GSSOC, SSOC, SWOC).
Enter your participant role here.
gssoc-ext, hacktoberfest
Closes
Enter the issue number that will be closed through this PR.
Closes: #issue-number #897
Describe the Add-ons or Changes You've Made
Give a clear description of what you have added or modified.
Describe your changes here.
addition of python algorithm to test for cycle in the list. I have added readme file and program file
Type of Change
Select the type of change:
How Has This Been Tested?
Describe how your changes have been tested.
Describe your testing process here.
Used compiler to test the code
https://github.com/user-attachments/assets/84391f24-96d3-481c-925d-7dedca0f709d
Checklist
Please confirm the following: