If the numbers are arbitrary then you can not do better than O ( n log (n ) ) ... this is a proven lower bound. Google for "Element Uniqueness" and you will find links to these proofs.
-Dhyanesh
On 12/2/05, pramod <[EMAIL PROTECTED]> wrote:
I am sorry I did not get your solution.
So if the given array is say { 5, 1, 8, 100 }
all are > 1, how will your algo work?
Or you had counting sort in mind? for my problem, counting sort is
ruled out.
