Amazon interview question

Detect loop in Linked List