Pregunta de entrevista de Georgia Tech Research Institute

write code to detect a loop