Does treeset remove duplicates?



Does treeset remove duplicates?..

Answer / Priti Kumari

No, a TreeSet does not automatically remove duplicates when added to. To avoid duplicate elements in a TreeSet, you must ensure that the elements are unique before adding them.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

How do you sort large data?

1 Answers  


How does a hashmap work?

1 Answers  


Explain circular linked list?

1 Answers  


Define ancestor and descendant ?

1 Answers  


Different Types of pattern?

1 Answers   Wipro,


Define linked list data structure.

1 Answers  


What does abstract data type means?

23 Answers   College School Exams Tests, Infosys, SBIT, TCS,


Which type of efficient data structure is used in the internal storage representation in RDBMS?

1 Answers   Accenture,


Does treemap allow duplicate keys?

1 Answers  


Can a hashmap have duplicate keys?

1 Answers  


Which is better hashmap or treemap?

1 Answers  


What do you mean by hash function?

1 Answers  


Categories