Pregunta de entrevista de Cerebry (Singapore)

Detecting a loop in a linked list

Respuesta de la entrevista

Anónimo

7 de dic de 2023

Detecting a loop in a linked list can be done using Floyd's Tortoise and Hare algorithm. It involves two pointers moving at different speeds; if they meet, there's a loop.