Question d’entretien chez Cerebry (Singapore)

Detecting a loop in a linked list

Réponse à la question d'entretien

Utilisateur anonyme

7 déc. 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.