sorry, I win :)

On 26 Nov, 19:55, asit <[EMAIL PROTECTED]> wrote:
> static List<T> removeDuplicates(List<T> inputList)
> {
>  Dictionary<T, int> uniqueStore = new Dictionary<T, int>();
>  List<T> finalList = new List<T>();
>
>  foreach (T currValue in inputList)
>  {
>   if (!uniqueStore.ContainsKey(currValue))
>   {
>    uniqueStore.Add(currValue, 0);
>    finalList.Add(currValue);
>   }
>  }
>  return finalList;
>
> }
>
> before calling the above function, sort the list. It will be faster.

Reply via email to