HashMap | and LinkedHashMap CIP | Question 4

Last Updated :
Discuss
Comments

What is the time complexity of the get() method in a HashMap in the worst case?

O(1)

O(n)

O(n logn)

O( log n )

Share your thoughts in the comments