Domanda di colloquio di Huawei Technologies

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

Risposta di colloquio

Anonimo

26 feb 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