Hans Fugal <fugalh / zianet.com> writes:

> Having not heard of this particular problem, I jumped to the
> conclusion that it was one of those "write this seemingly simple
> program but you're not cool unless you do it the clever way I'm
> thinking of" problems. If it's really used as just a "can you write a
> simple program" question, I'm all for that.

Right, which is why FizzBuzz or the minsum question I mentioned (or
even the "World Hello" problem) are fair game in an interview, but
"how do you detect a loop in a singly linked list in an efficient,
O(n) manner" is just not.  (Unless the candidate has just made the
claim that they've read all three of Knuth's books thoroughly and are
being an ass about it)

(Incidentally, I know of two different solutions to that problem,
neither of which are likely to ever be of any use to me at all.)

-- 
s=%q(  Daniel Martin -- martin / snowplow.org
       puts "s=%q(#{s})",s.to_a.last       )
       puts "s=%q(#{s})",s.to_a.last