9 ms·
Floyd Ryvest also does the job . A bit more efficient IIRC. However I never managed to understand how it works. https://en.m.wikipedia.org/wiki/Floyd%E2%80%93
by furstenheim 2y ago
Floyd Ryvest also does the job . A bit more efficient IIRC.
However I never managed to understand how it works.
https://en.m.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm https://en.m.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorit...