Jane Street interview question

Explain hash table. How would you optimize the worst case lookup for retrieving an object from a hash table?

Interview Answer

Anonymous

2 Aug 2016

Hash table is CS 101. For optimizing I suggested coming up with a better hashing function or increasing the number of buckets to reduce collisions. The interviewer then suggested the use of a BST.