American Express interview question

How to detect loops in a linked list