Can a hashmap have duplicate keys?



Can a hashmap have duplicate keys?..

Answer / Mohammad Mohsin

No, a HashMap (or Dictionary in some languages) does not allow duplicate keys. Each key in a HashMap must be unique.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

List the applications of stacks?

1 Answers  


What is array define its types?

1 Answers  


What are scalar values?

1 Answers  


Provide an algorithm to reverse a linked list without using recursion.

1 Answers   Wipro,


Is an arraylist a vector?

1 Answers  


Why would we use dynamically allocated arrays vs vectors?

1 Answers  


What is dynamic array in excel?

1 Answers  


Can we sort hashmap?

1 Answers  


What is an ordered map?

1 Answers  


What is map data structure?

1 Answers  


What actions are performed when a function returns?

1 Answers  


Will arraylist maintain insertion order?

1 Answers  


Categories