Question d’entretien chez Amazon

How would you implement a native Hashmap

Réponse à la question d'entretien

Utilisateur anonyme

30 août 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.