Skip to content

Floyd's Cycle Detection

Try it yourself

One step against two, until they meet or the list runs out

head1234567fastslow
slow = fast = headboth pointers start at the head
round 0 · ready

Watch the animation