The fastest to find duplicates is by copying the ArrayList elements to a Set. And then determine the difference between the length of ArrayList and Set. It is the nature of the Set that it doesn't accept duplicates. Hence, it'll exclude all of them.