Domanda di colloquio di Zynga

find cycle in linked list

Risposte di colloquio

Anonimo

6 feb 2012

Floyd's cycle finding algorithm

Anonimo

28 mar 2015

Two pointers. One is faster and jumps 2 nodes at a time. Another 1 node at a time. They are guaranteed to meet if there is a cycle.

Anonimo

27 gen 2011

two pointers