Title Link: https://leetcode.com/problems/linked-list-cycle/
To determine if there is a ring in a list, you can set two pointers, one for each advance of the first, and two for each second.
For a forward two-pane pointer, you need to first determine if the forward one is NULL:
If you do not determine if it is NULL, taking two times next May cause Runtime Error.
If NULL, the link list does not exist in the ring.
If there is a ring in the list, then each advance of the two-cell pointer will eventually catch up with each advance of a grid of pointers.
If a ring does not exist in the list, the pointer to the two-way forward will eventually be NULL.
Note: The previous day saw the question "Judging whether there is a public part of the two linked list". One approach is to connect the two-link list to the end of the line to determine whether there is a ring problem.
Leetcode #141 Linked List Cycle