/rusty-floyd

Floyd's tortoise and hare in Rust

Primary LanguageRust

rusty-floyd

Floyd's tortoise and hare algorithm applied to finding a duplicate in an array of size n containing integers between 0 and n-1.

Linear time and constant space! 🤯