Say you have a long string and you want to collect all of the letters within it without storing duplicates. what would be the most appropriate type to store the letters in? group of answer choices

Respuesta :

Set will use to collect all of the letters from a long string without storing duplicates

Explain set in collections?

A Collection that excludes duplicate elements is referred to as a Set. HashSet, Tree-Set, and LinkedHashSet are the three general-purpose Set implementations. The best-performing approach is a hash set, which does not guarantee the order of iterations but saves its components in a hash table. Tree-Set is significantly slower than HashSet and stores its items in a red-black tree in the order of their values. The implementation of LinkedHashSet as a hash table with a linked list via it arranges its members according to the order in which they were added to the set (insertion-order). For a marginally higher price, LinkedHashSet protects its clients from the vague, generally chaotic ordering offered by HashSet.

To learn more about set, visit:

https://brainly.com/question/18087517

#SPJ4