Qualcomm Interview Question

How to detect a loop in link list