tests weather the given collection has duplicates using default equality ==
tests weather at least two elements map to the same key using the given function
tests weather at least two elements are considered equivalent using the given function this has runtime O(n^2)