News for hackers. Stuff that matters.
Re:Linked List Problems (2002) [pdf] by hota_mazi on Saturday November 25, 2017 @09:10AM (#15776034)
Totally agree.

If I ask this question (I never would) and I get the "tortoise and the hare" answer, it's much more likely that the candidate already knew the answer rather than deduced it themselves. And I have learned exactly nothing about that candidate, except that they probably looked up common interview questions before coming.

A more reasonable answer to this question would be to store the nodes you've already seen in a hash map, keyed to their position, and stop when you encounter the same node twice. This in turn leads to interesting discussions about list size, memory cost, and more general questions about the properties of a hash map.

Re:Linked List Problems (2002) [pdf] by rayiner on Saturday November 25, 2017 @09:48AM (#15776149)
Plus, someone should be able to get the hash table brute force answer coming in cold.