Fast and Slow Pointer: Floyd's Cycle Detection Algorithm Explained
6d ago · 21 min read · TLDR: Move a slow pointer one step and a fast pointer two steps through a linked structure. If they ever meet, a cycle exists. Then reset one pointer to the head and advance both one step at a time —
Join discussion























