Pregunta de entrevista de RxLogix Corporation

How to check wether a list is loop or not? PseudoCode.