- HashSet
- TreeSet
- LinkedHashSet
The fastest among the 3 implementations , but does not maintain ordering.
TreeSet:
The slowest among the 3 implementations , uses red black tree to internally store items and orders the items by value.
LinkedHashSet:
Its performance comes in between the 1st two but maintain the ordering in which items are
inserted . Uses hashtable with linked list to store items.
No comments:
Post a Comment