Domanda di colloquio di EFI

Find loop in a linked list.

Risposta di colloquio

Anonimo

4 apr 2013

Use two pointers, fast and slow, fast should meet slow at some point should a loop exist. Increment fast by 2 and slow by 1.

3