Problem 287 : Find the duplicate number ( Why ask this question?)

Problem 287 : Find the duplicate number
I was recently asked this problem in an interview. The only solution acceptable to the interviewer was the O(N) time and O(1) space one. The two pointer solution.

I want an honest opinion here.

Does the leetcode community feel this is a right question to ask? The mathematics behind this question isn't a straightforward one and moreever only very very few people will be the derive and code it up in 45 mins.

Personal opinion : This is a good example of how bad interviewing has become these days. The guys solving these questions will most likely would have solved just because they have seen this before. (99.99% of candidates, 0.01 expect real smart ass math people).

I felt really bad that the company which I felt would be the last one to screw up interviewing , messed it up.

Companies should lay out guidelines how and what to test.

The only good thing comes out of asking this is, a possibility that , if the candidate is able to solve and explain the solution, then he would have taken efforts to solve 100 other problems, thereby improving his programming.

Comments (1)