Domanda di colloquio di Google

Check the LinkedList have cycle or not

Risposta di colloquio

Anonimo

19 set 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