4 ms·
I am not familiar with the book or with this problem, but I thought the O(n) solution was immediately obvious. It's not unreasonable to ask interviewees questio
by oofabz 16y ago
I am not familiar with the book or with this problem, but I thought the O(n) solution was immediately obvious. It's not unreasonable to ask interviewees questions like this. I wouldn't want to hire someone who can't write an efficient algorithm.
- skew 16y agoThis thread is the first time I've seen people consider these programming puzzles primarily as a test of memorization. The question is whether candidates can find a reasonable solution; it's a failure of the test if they already have seen the puzzle. Do people think nobody could possibly solve this puzzle on their own?