Question d’entretien chez Google

Check the LinkedList have cycle or not

Réponse à la question d'entretien

Utilisateur anonyme

19 sept. 2023

Its easy, take two variable Fast and Slow, in every itration make slow+1 and fast+2 and if slow==fast then cycle else NOT