List Vs Set
1) Set does not allow duplicates. List allows duplicate. Based on the implementation of Set, It also maintains the insertion Order .
eg : LinkedHashSet
. It maintains the insertion order.Please refer click here
2) contains method. By nature of the Set it will give better performance to access. Best case its o(1). But List has performance issue to invoke contains
.