3 ms·
"Knowing how to code a mergesort" is specifically not what they're looking for, in my experience. The idea is to come up with a problem that requires an intere
by thedufer 14y ago
"Knowing how to code a mergesort" is specifically not what they're looking for, in my experience. The idea is to come up with a problem that requires an interesting algorithm that very few people will know, and see how the candidate reasons their way to an answer.
- dockd 14y agoAre you saying they should be able to derive a little known algorithm by themselves? What do you make of Knuth's quote about how many people implement binary search wrong? http://en.wikipedia.org/wiki/Binary_Search#Implementation_issues http://en.wikipedia.org/wiki/Binary_Search#Implementation_is...
- jrockway 14y agoMany people implement it wrong. The best programmers know how to check their work, and will be asked during the interview to check. Who doesn't know that (x + y) / 2 can overflow? But the people who you really want to filter out have no idea or intuition that a problem can be solved by slicing it into two. That's the key idea behind binary search (and indeed, much of computer science).