implemented CycleDetectionII code in LinkedList#1482
implemented CycleDetectionII code in LinkedList#1482raklaptudirm merged 13 commits intoTheAlgorithms:masterfrom
Conversation
appgurueu
left a comment
There was a problem hiding this comment.
- The code is still messy (mostly formatting-wise, the
lengthCyclefunction should be defined before use for better readability, IMO). Please add comments, and give better variable names (i.e. I assumefandsarefastandslow; why do you need them when you already havefastandslow?). - As for the tests, remove the 3 redundant comments there which just repeat test case names.
…into LLupdates
|
Dear maintainers,
Let me know! And thanks again for the review :) I wanted to reach out to let you know that while attempting my first contribution to this open source project, I ran into some issues with git push. (That's why so many commits) After doing some research, I was able to resolve the issues and successfully contribute my changes. |
|
Hey maintainers, I'd be really glad if you could review this ;) |
|
Dear maintainers, |
|
Please let me know if there's anything more that needs to be addressed. Fingers crossed for the merge ;) |
|
Sorry for the long delay. I simplified the code a bit and renamed some variables. I hope you're fine with this, otherwise feel free to complain :) LGTM! |
LGTM too! Thanks for simplifying things, and no complaints here :)) |
Hey maintainers,
I've implemented the code for getting the starting node of cycle in a linked list which i think will be useful for understanding of cycle-type-questions.
I've also added the tests to check the correctness.
It'll be my first open source contribution and also in Hacktoberfest. Hoping a success :)
Changes:
Checklist:
I've read the CONTRIBUTING.md file and also checked the testcases using npm as asked to.
This pr is all my own work.