Back to DSA
Linked List Cycle II
mediumGiven a linked list that may contain a cycle, identify the node where the cycle begins. If no cycle is present, return null. The cycle entry point is the first node that is revisited when traversing the list.
Examples
Example 1:
Input:
head = [1,3,5,7], pos = 1Output:
Node at index 1 (value 3) Example 2:
Input:
head = [2], pos = -1Output:
nullHints
1234567