recategorized by
2,963 views

2 Answers

1 votes
1 votes

P----> P1 --> Next
P2 ---> P2 --> Next --> Next

Everytime when P1 cross 1 element, P2 will cross 2 element.
Pwill be null then P1 will be at position (length of LINKED LIST)/2 i.e. Middle of the list.

Related questions