For the algorithm itself, see: http://en.wikipedia.org/wiki/Floyd%27s_cycle-finding_algorithm -- Jens axel Søgaard