Linked list loop detection algorithm
Because maybe not the complete linkedList is within the loop. For a linked list lasso detection algorithm, you need two pointers: As long as the first pointer is where the cowboy is, no loop is detected. But if you move it stepwise forward, it will eventually enter the loop. BTW, lasso is the terminus technicus … Read more