4 ms·
The cycle might not include the head of the list. You need to keep moving the turtle until it is in the cycle. Otherwise the rabbit will enter the circle and
by mbrubeck 17y ago
The cycle might not include the head of the list. You need to keep moving the turtle until it is in the cycle. Otherwise the rabbit will enter the circle and keep running around and never see the turtle again.
Crude ASCII art version:
TURTLE-->--+--->--+
/ \
| RABBIT
\ /
+---<--+