Does a sequence contain duplicates?