Discussion about this post

User's avatar
Abhishek Jain's avatar

Hi,

Thanks for the detailed explanation. I had a small doubt - if the hashmap’s capacity does not exceed threshold, then it uses linkedlist for storing and fetching the values. Then how come it guarantees constant time put and get operations

Expand full comment
Gyan Prakash's avatar

I think after java 8 they have changes the internal implementation from linked list to binary tree for better complexity in get calls

Expand full comment
7 more comments...

No posts