Algorithms for checking if all elements in array are unique

Hello,I have to compare and find out efficient algorithms for finding out whether all elements in array are different of notCould you please suggest some more efficient algorithms to implement and compare in Java?Thanks in advance,Mike
[270 byte] By [mike_sotoa] at [2007-10-2 6:11:05]
# 1

> I have to compare and find out efficient algorithms

> for finding out whether all elements in array are

> different of not

You can use either a hash table or sort the array. Using a hash table will generally make it more efficient.

Look for "HashMap" and "Arrays.sort()" in Java.

Learnablea at 2007-7-16 13:11:45 > top of Java-index,Other Topics,Algorithms...