Pergunta de entrevista da empresa Amazon

How would you implement a native Hashmap

Resposta da entrevista

Sigiloso

30 de ago. de 2015

Use a traditional array approach and compute a hash value of the string that needs to be inserted by converting it into ASCII, multiplying with a random salt followed by modulus operation on the size of array to get a unique location(index) in the array(the key) and insert the corresponding string value on that index of array.