Questions tagged [cycle-finding]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
10
votes
2answers
805 views

Floyd's cycle-finding algorithm

I am writing a piece of code for some students and I came up with the following implementation of Floyd's algorithm for finding cycles in linked lists. I was wondering if there are ways I can improve ...