Qualcomm Interview Question

Detecting loop in linked list