News for hackers. Stuff that matters.
Re:Python Multiple Assignment Is a Puzzle by jw2013 on Sunday July 27, 2014 @03:20PM (#8093678)
The context for these coding-challenges is they are the type for algorithm competition or white-board coding interview.

Back then when I was still looking for job, I was asked this question by a startup. I gave out this hashset solution and was quickly asked if O(1) space solution was available and then asked to implemented it.

If the space restriction is not an issue, I would definitely go with the method you suggested. Way more succinct and easier to follow.

There are no comments on this comment yet.