Tortoise & Hare on a rho-shaped linked list. Build, run, find the cycle start.
Build your list
slowfast
Visualization
tortoise (slow, 1 step)
hare (fast, 2 steps)
cycle entry
meeting point
reset to head
PHASE 1 -- Detection
Step explanation
READY
Build a list above (try 1,2,3,4,5 with loop_at=2) then press Play or Step >.
Watch the tortoise (blue) advance 1 step and the hare (orange) advance 2 steps. They meet inside the cycle.