Juniper Networks interview question

How to detect loop in a linked list