Amazon interview question

Detect cycle in a linked list.