3 ms·
If they were willing to give you a top compensation, then OK, writing hash table from the scratch is a pretty common question at Google/FB. If it was for some g
by bitL 7y ago
If they were willing to give you a top compensation, then OK, writing hash table from the scratch is a pretty common question at Google/FB. If it was for some generic job with generic pay, they did you a great service by rejecting you.
- otabdeveloper4 7y ago"Writing a hash table from scratch" is a programming 101 problem just slightly harder than FizzBuzz, but not by much. Though I guess these days I guess 'software development' means downloading Javascript crap from github and copy-pasting CSS.
- bsder 7y ago> "Writing a hash table from scratch" is a programming 101 problem just slightly harder than FizzBuzz, but not by much. No, it's bloody not. What's your hash function? Why? What do you do on hash collisions. How many buckets and how big? Does your hash function map to identity or not? Do you exclude certain fields from hashing? How do you handle contention from multiple threads? I can go on and on. The fact that you think writing a hash is easy betrays a stunning amount of ignorance.
- detaro 7y agoThat's the difference between a hashtable you might want to use in practice and a toy example to have someone write some code while quizzing some CS theory.
- antisemiotic 7y agoTo be fair, the interview question a few posts up mentioned a working hash table, saying nothing about efficiency or thread safety. (though such a question could be gamed with a linked list as a "well akshuolly" a single-bucket hash table...)