In java 8, what\'s the best way to check if a List contains any duplicate?
My idea was something like:
list.size() != list.stream().distinct().count(
Given array arr,
arr.length!=Arrays.stream(arr).distinct().count()
will help check for duplicates