Given the head of a linked list, return the node where the cycle begins. If there is no cycle, return null. Do not modify the list. Example: Input: head = [3,2,0,-4], pos = 1 Output: Reference to node with value 2 Explanation: Cycle starts at node index 1 (value 2). Pattern focus: List Cycle Entry (find cycle start via two pointers).
head = ListNode
return ListNode
Example 1:
Input:
head = [3,2,0]
Output:
-1
Example 2:
Input:
head = [1,2]
Output:
-1