Floyd's Tortoise and Hare (Cycle Detection) algorithm
Sep 27, 2023 · 4 min read · This algorithm is commonly used to detect cycles in a linked list but can also be adapted to find duplicates in an array. Floyd's Cycle Detection Algorithm, also known as the "tortoise and hare" algorithm, is a popular method for detecting cycles in ...
Join discussion