> i have a list which contains repeating elements.
> 
> I just want to pull distinct elements in the list.
> 
> suggestions pls.

Easy way - 

ListSort the list.

The loop through the list once.

If an element in the list has a different element before it, and after it, you know it 
must be unique.

So only O(n) + whatever the O sorting algorithm is.

Not a bad way to do it.

(Could covert it to an array first, then do your stuff, and then convert it back - MAY 
be faster).

Mark

-----------------------------------
[EMAIL PROTECTED]       
ICQ: 3094740
Safe From Bees
[www.safefrombees.com]

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to