Pergunta de entrevista da empresa Huawei Technologies

How to find, whether a loop exists in linked list ?

Resposta da entrevista

Sigiloso

26 de fev. de 2012

Take two pointers, one travels with an overhead of one node at a time, the other one two. When both meet, there is a loop