← All problems
Linked List Cycle II (find cycle start)
Detect whether a linked list has a cycle; if so return the node where it begins.
Complexity
Time O(n), Space O(1)
Common pitfalls
- Returning the meeting point as the answer (wrong)
- Hash set works but uses O(n) space
Your solution
Log in to save your code and track progress.