Just use the dummy head pointer and why first find the meeting point and then set the result-pointer at the dummy and move forward to find the result position.

There are the reasons :

set the

```
[#cycle length = C ]
[#length-from-head-to-cycle-start-point = L]
[#cycle-start-point-meeting-point=S]
[#meeting-point-clock-direction-to-cycle-start-point=Y]
[#step needed to meeting=T]
```

Then when they meet, we have

```
2 * T = T + N1 * C N1=0,1,2...
```

so we get

```
T = N1 * C
```

Also we have

```
2 * T = L + N2 * C + S N2=0,1,2...
```

we can get

```
N3 * C = L + S with C = S + Y N3 = 2 * N1 - N2
```

so we have

```
(N3 - 1) * C + S + Y = L + S
```

then we have

```
(N3 - 1) * C + Y = L
```

just means that we can do the things that have been explained by others.

We can move a node from head and node from the meeting point, then when they meet, it is the

start point of the cycle.

Here is the code :

```
class Solution {
public:
ListNode *detectCycle(ListNode *head) {
ListNode* dummy=new ListNode(-1);
dummy->next=head;
ListNode *slow=dummy, *fast=dummy;
bool flag=false;
while(fast && fast->next){
slow=slow->next;
fast=fast->next->next;
if(fast==slow) { flag=true; break; }
}
if(!flag) return NULL;
ListNode* result=dummy;
while(result != slow){
result=result->next;
slow=slow->next;**strong text**
}
return result;
}
};
```