2 ms·
Just for my own edification, what is the optimal solution? I haven't yet seen a proof on the lower bound of cycle detection, so I don't know if other quicker s
by smanek 18y ago
Just for my own edification, what is the optimal solution?
I haven't yet seen a proof on the lower bound of cycle detection, so I don't know if other quicker solutions (like Brent's algorithm) are optimal or are just the best we've found.
And I don't think there is anything incorrect with referring to Floyd's cycle-finding algorithm as the tortoise and the hare algorithm. Most literature I've seen mentions the alias too.