Re:Why we don't hire programmers based on puzzles and tricks
by danielweber on Friday February 22, 2013 @11:25AM
(#5265046)
The point of any question isn't whether they get it right or wrong. The point is how they work through it.
I've been perfectly happy with people who didn't get the "right" answer to some question.
Re:Why we don't hire programmers based on puzzles and tricks
by smackfu on Friday February 22, 2013 @12:19PM
(#5265324)
I would be surprised if many people knew hashing algorithms at all.
Re:Why we don't hire programmers based on puzzles and tricks
by msluyter on Friday February 22, 2013 @12:28PM
(#5265372)
To clarify, you don't need to implement a hashing algorithm for this question. (Using hashCode() suffices). And you don't even have to implement a hash table. As I mentioned, a working linked list of key/values would probably be an above average answer, if it came with the understanding of the big-O performance characteristics.
On the one hand, it gets at some important java concepts: hashCode() and equals() and the relationship between them. Depending on how they go about it, you can also get into issues of runtime complexity, memory/speed tradeoffs, etc... It's a deep question that offers a lot of room for exploration.
On the other hand, as mentioned, people usually do fairly poorly at it, and so my fear is that it's simply too difficult. I mean, I'd even be satisfied with solutions storing key/value pairs in a list -- inefficient, but workable -- but it's fairly rare that folks even get that close.