Qualcomm interview question

Detect a loop in linked list