Skip to content

Comment on Python Multiple Assignment Is a Puzzleparent

Comments

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.