Amazon Interview Question

say sth about hash table.

Interview Answers

Anonymous

Mar 7, 2011

lots of detailed question followd

Anonymous

Mar 23, 2011

A Hash Table essentialy takes a hash of some given input block and constructs a table, which points to the source block. In many cases is arguably faster to use a hash table, because indexing into a table is much faster than comparing the complete block to every block the table references. It is useful in comparing strings for example. One can generate the hash, then use a binary search alogrithm to jump to the closest match. There are many different variations of hash table algorithms. Collisions can occur when two hash values are similar for different blocks. When that occurs, it is possible to use a second hash or to then perform a strict comparison of the blocks. There are many other variants and optimizations of this algorithm.