This question was asked to me in an interview. I think the only way to get best solution is SOF. So the question was \"How would you implement a custom HashMap in java(A
Short Answer:
It would be an array of arrays (or Lists).
Object[][] map;
where map[bucketIndex] would return the 'bucket'.
map[bucketIndex]
When inserting something you need a function to calculate bucketIndex this would use the hashcode of the inserted object.
bucketIndex
hashcode
Boom done!
:)