Question d’entretien chez Amazon

How do you implement a HashMap in java if suppose there was no java.util.HashMap class available.

Réponses aux questions d'entretien

Utilisateur anonyme

6 mai 2012

@NoRiddim, Can you elaborate the two dimensional approach? How do you store the row_index & column_index values?

Utilisateur anonyme

5 sept. 2009

write a class which can have two array list.one to store key and another to store value. use some indexing algorithm, to make good performance.

1

Utilisateur anonyme

12 oct. 2009

Instead of using 2 lists; which could make synchronizing (when adding/removing) these lists an overhead you could use a 2 dimensional array.