

Detecting loops in a linked list - the Tortoise and Hare - SandB0x
http://eddii.wordpress.com/2006/11/15/detecting-infinite-loop/

======
famfam
Yep. This has been a standard interview question for probably at least 15
years.

~~~
jonsen
Is it also standard to call it an _infinite_ loop?

------
jrockway
_However, I cannot imagine transforming my algorithm into a recursive
algorithm. It just appears overwhelming._

This is why we shouldn't teach Java (or C) as a first language. People are so
used to programming the computer that they don't really stop to understand
what's going on. Even when writing about algorithms.

