Does anyone know of a semi-efficient way of detecting duplicates in a given set of data (specifically duplicate integers) other than just sorting the data into an array and then stepping through each element in the array? Preferably a solution wouldn't involve something implementation specific (like loading the array into a different data type and measuring the differences between the two, saw someone doing that with Java ArrayLists and HashSets) but rather some sort of mathematically correct method of doing it. Thanks for the help. -Tyler Earman