HashSet vs TreeSet vs LinkedHashSet, Which is the fastest of these three set interface implementations?
both HashSet and LinkedHashSet
HashSet is the most fastest of all 3 implementations, as it doesn't maintain in insertion or any other ordering of data.
LinkedHashSet has to maintain insertion order, and TreeSet has to maintain ascending order. So they are little slow.
Back To Top