Samsung Electronics interview question

Detect if a linked list has a loop.