1.

What is the time complexity of basic operations get() and put() in HashMap class?

Answer»

The time complexity is O(1) assuming that the hash function used in the hash map distributes elements uniformly among the buckets.




Discussion

No Comment Found