Pregunta de entrevista de Bloomberg

How it's implemented a HashMap?

Respuesta de la entrevista

Anónimo

29 ene 2016

That is a funny question, because standard HashMap Java implementation (and C++ unordered_map as well) use one of the worst possible implementations - buckets of linked lists. Instead of open addressing, which is much more cache friendly and beats the linked lists performance by a great deal (not even speaking about memory allocations which make the linked lists even much worse).