Zynga interview question

find cycle in linked list

Interview Answers

Anonymous

6 Feb 2012

Floyd's cycle finding algorithm

Anonymous

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.

Anonymous

27 Jan 2011

two pointers