Question 1: How to check whether there is a loop in a linked list? For example, the list in Figure 1 has a loop.
Question 2: If there is a loop in a linked list, how to get the entry node of the loop? The entry node is the first node in the loop from head of list. For instance, the entry node of loop in the list of Figure 1 is the node with value 3.
Read full article from Coding Interview Questions: No. 29 - Loop in List
Question 2: If there is a loop in a linked list, how to get the entry node of the loop? The entry node is the first node in the loop from head of list. For instance, the entry node of loop in the list of Figure 1 is the node with value 3.
Read full article from Coding Interview Questions: No. 29 - Loop in List