Detecting a loop in a linked list
Anonymous
Detecting a loop in a linked list can be done using Floyd's Tortoise and Hare algorithm. It involves two pointers moving at different speeds; if they meet, there's a loop.
Check out your Company Bowl for anonymous work chats.