Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.
Simply iterate List by exah element store each element in Set.
i.e.Convert list to set
Set doesn't store duplicate elements.
The easiest way is to use nested for loop, but you can take an element for example a[0] then use contains function in smart way then you do that in smart way