Floyd's Fast & Slow Pointer Algorithm
Flowcharts & Algorithms diagram · made in Skemio

What it shows
- Tortoise pointer moves 1 step; hare pointer moves 2 steps each tick.
- Relative distance closes by 1 each step, guaranteeing O(N) convergence.
- Requires strictly O(1) auxiliary memory compared to O(N) hash sets.
The takeaway
Two pointers moving at different speeds detect closed cycles in linear time without memory allocation.
- #Algorithms
- #DataStructures
- #CodingInterviews
- #ComputerScience
- #LeetCode
- #SoftwareEngineering





