← All problems

Linked List Cycle II (find cycle start)

Medium linked liststwo-pointers LeetCode ↗
Detect whether a linked list has a cycle; if so return the node where it begins.

Hints (0/3 revealed)

Log in to reveal hints progressively.

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.