MB9 interview question

How would you detect a loop in a linked list Write the code for it