Comment

Comment by jiggawatts

There was a hilarious rant about a FAANG hiring question that was something like: "Write an algorithm for detecting if a linked list has any loops in it, in linear time, using a constant amount of memory."

Apparently the correct answer is to use "Robert W. Floyd's tortoise and hare algorithm", which is trivial to explain and code.

The catch?

It took a decade of computer science research between the original statement of the problem and Floyd discovering the solution.

So... no worries, you have an hour, a marker, and a whiteboard. Your time starts: now.

parent jiggawatts 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton