What is the difference between hashset and arraylist?



What is the difference between hashset and arraylist?..

Answer / Ajay Kumar Singh

HashSet is a collection of unique elements without any specific order, while ArrayList is an ordered list that allows duplicate elements. HashSet uses a hash table for faster lookup times, whereas ArrayList uses an array under the hood.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

What are the advantages of sorting?

1 Answers  


Which sorting is worst?

1 Answers  


Can we insert null in set?

1 Answers  


How can you insert a node at the end of linked list?

1 Answers  


Explain about the different lists available in the collection?

1 Answers  


Why do we need a data structure?

1 Answers  


Define internal nodes?

1 Answers  


What are the Difference between tcp and udp?

1 Answers  


How many types of data structure are there?

1 Answers  


Of the following tree structure, which is, efficient considering space and time complexities? (a) Incomplete Binary Tree (b) Complete Binary Tree (c) Full Binary Tree (b) Complete Binary Tree.

1 Answers  


What is an expression tree?

1 Answers  


Is bubble sort slow?

1 Answers  


Categories