Linked List Cycle II
Given the head of a linked list, return the node where the cycle begins. If there is no cycle, return null.
Linked List Cycle II

Given the head of a linked list, return the node where the cycle begins. If there is no cycle, return null.

Example 1:
Input: {"values":[3,2,0,-4],"cyclePos":1}
Output: node at index 1
Input
arr ={"values":[3,2,0,-4],"cyclePos":1}

Find cycle start. List has cycle at index 1

Phase 1: Detect

Phase 2: Find Start

Linked List (cycle at index 1)
3

S

F

0

2

1

0

2

-4

3

↩ to [1]

Slow (S)
Fast (F)
Both Meet
Cycle Start
Variables
No variables to display
DepthFunction Call
Stack empty
0/7