Zynga Interview Question

find cycle in linked list

Interview Answers

Anonymous

Feb 6, 2012

Floyd's cycle finding algorithm

Anonymous

Mar 28, 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.

Anonymous

Jan 27, 2011

two pointers