Pergunta de entrevista da empresa Morgan Stanley

How does HashMap works? What is the time complexity of the get method in HashMap?

Resposta da entrevista

Sigiloso

14 de set. de 2018

Time complexity of get method is O(1). Hashmap internally uses an array of Entry to store elements. Key & value are stored in this array after performing hashing of key.

2
Pergunta de entrevista da empresa Morgan Stanley: How does HashMap works? What is the time complexity of the get method in HashMap? | Glassdoor