Hacker News new | past | comments | ask | show | jobs | submit login

It's a good signal for me when I'm presented with silly brain teasers like this in interviews, especially when the technology of the company isn't that great.

I'm interviewing you too, so give me something that reflects the problems you solve as a team, otherwise my assumption is your office is full of white boards containing puzzles of the day and your tech is all 3rd party libs.




I wouldn't actually class this as a brain-teaser. It is a non-trivial[1] problem that doesn't require an "aha!" moment to get right. It is amenable to multiple ways of reaching a correct solution. It has interesting follow-up questions. It also stands a minimal chance to actually discover (some) of the way a candidate thinks. It is also implementing the VM for a Turing-complete computational model.

It may also be that anything work-related is actually too long to fit into a limited interview time.

Now, a trivial, brain-teaser, question would be "you have an NxM matrix, and you can either go left or up. How many paths are there from the lower left, to the upper-right corner?"

I consider it a brain-teaser because if you write code that contains any matrix manipulation or searching, you have basically failed. There is a closed-form expression for the number, so...

[1] By "non-trivial", I basically mean that there are multiple correct solutions.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: