Pergunta de entrevista da empresa Luxoft

What is the cost of hash-code collision in HashMap? What if hashCode() return '1'?

Resposta da entrevista

Sigiloso

14 de mai. de 2023

The HashMap performance will degrade and all keys end up storing in one bucket as a binary tree. The algorthnic complexity is O(log(n)) in this case

2