What is the difference between hashset and hashtable?



What is the difference between hashset and hashtable?..

Answer / Sandeep Bajpai

A HashSet is a collection of unique elements, while a Hashtable (or Dictionary) is a data structure that stores key-value pairs. A Hashtable can have duplicate keys if you allow it, but a HashSet cannot.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Can nsarray contain nil?

1 Answers  


Which is faster hashset or treeset?

1 Answers  


What are the advantages of merge sort?

1 Answers  


Advanced problems related to Data Structures were asked

1 Answers   Motorola,


Is an arraylist an object?

1 Answers  


Which interfaces are implemented by printerstatereasons?

1 Answers  


In tree construction which is the suitable efficient data structure?

1 Answers  


Why is quicksort better than mergesort?

1 Answers  


How do you sort an array in descending order?

1 Answers  


how to find the number of possible tree in the given tree.

12 Answers   Persistent, TCS, Wipro,


Are hash tables ordered?

1 Answers  


What is complexity of bubble sort?

1 Answers  


Categories