We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Linked Lists: Detect a Cycle
- Discussions
Linked Lists: Detect a Cycle
Linked Lists: Detect a Cycle
Sort by
recency
|
515 Discussions
|
Please Login in order to post a comment
@hakerRank, why the algorithm in ruby not working?
Seems like the starter code and tests have become corrupt along the way. The started code does not match the challenge description at all. I tried the Ruby, Java 8, and Java 15 examples and they were all the same way.
Has anyone tried using Javascript as the language ? The input to the test cases is not a pointer to the list, instead its just a string "1".
Here's one way to do it in Python3:
python3