Floyd’s cycle detection (tortoise and hare): what does it detect and what are its time/space costs? | LetsGit.IT