<p>You might be thinking of <a href="https://en.wikipedia.org/wiki/Floyd%27s_cycle-finding_algorithm#Tortoise_and_hare" rel="nofollow">Floyd's algorithm for finding cycles</a>.  Given a singly linked list, it finds a cycle in the list (if one exists) in constant space and time linear in the size of the list.</p>

CC BY-SA 3.0
2013-09-09T01:25:12.890Z
2013-09-09T01:25:12.890Z
D.W.
<p>The other day, I came across an offhand mention of something called "Flynn's algorithm," which, as I gathered, had something to do with a linked list.  But that's all I was really able to discern.  Can anyone point me to a paper, or at least a web page that might further enlighten me?</p>

<ds.algorithms>
What is "Flynn's algorithm" relating to linked lists?
Paul Miller
# What is "Flynn's algorithm" relating to linked lists?

(Asked by: username_0 on 2013-09-08)

The other day, I came across an offhand mention of something called "Flynn's algorithm," which, as I gathered, had something to do with a linked list. But that's all I was really able to discern. Can anyone point me to a paper, or at least a web page that might further enlighten me?

**Tags:** ds.algorithms


---

## 1 answers

### Answer by username_1 on 2013-09-09. Score: 2

You might be thinking of [Floyd's algorithm for finding cycles](https://en.wikipedia.org/wiki/Floyd%27s_cycle-finding_algorithm#Tortoise_and_hare). Given a singly linked list, it finds a cycle in the list (if one exists) in constant space and time linear in the size of the list.


---

