I was asked recently why I’m “burning” my interview questions by posting them on the blog. That actually has several reasons:
- If a candidate reads my blog and is able to produce high quality code based on this, well… that is pretty much the job description right there.
- We just finish another recruitment round, and we aren’t planning another one for at least 4 – 6 months.
- The fact that I’m posting the answers to a specific question doesn’t mean that the the subject matter is closed.
However, the code as posted contains a bug, it is a small one, and all unit tests are passing, but it result is slightly inefficient behavior. Exposing that to a unit test is relatively easy, but going from the failing test back to the root cause and then fixing it would be an interesting investigative technique and good show of skills.