News for hackers. Stuff that matters.
Re:The Worst Programming Interview Question by yodsanklai on Friday June 27, 2014 @10:28AM (#7954048)
1) yes. 2) is ok (with a hash table instead of an array to have linear execution time), but doesn't run in constant space unlike 1), or you could mark the nodes when you visit them.

There are no comments on this comment yet.