Qualcomm interview question

How to detect a loop in link list