2 ms·
There was a blog post shared a while ago on HN where the author ranted that it was his least favorite interview question because the solution (fast/slow pointer
by JonathanMerklin 8y ago
There was a blog post shared a while ago on HN where the author ranted that it was his least favorite interview question because the solution (fast/slow pointers) was - if I recall correctly - literally somebody's PhD thesis. There was a years-long window where anyone "clever enough" could have waltzed in with a one page paper.
If you've never seen the pattern before, there is a very good chance that you're hosed.
Edit: found it [1]
[1] https://news.ycombinator.com/item?id=7953725 https://news.ycombinator.com/item?id=7953725
- YorkshireSeason 8y agoThe tortoise & hare algorithm [1] was not just discovered by some random PhD student, but by Robert Floyd, who won a Turing award. [1] https://en.wikipedia.org/wiki/Cycle_detection#Floyd's_Tortoise_and_Hare https://en.wikipedia.org/wiki/Cycle_detection#Floyd's_Tortoi... [2] https://en.wikipedia.org/wiki/Robert_W._Floyd https://en.wikipedia.org/wiki/Robert_W._Floyd