C# remove duplicates from List<List<int>>

Posted by marseilles84 on Stack Overflow See other posts from Stack Overflow or by marseilles84
Published on 2012-10-08T15:29:13Z Indexed on 2012/10/08 15:37 UTC
Read the original article Hit count: 143

Filed under:
|

I'm having trouble coming up with the most efficient algorithm to remove duplicates from List<List<int>>, for example (I know this looks like a list of int[], but just doing it that way for visual purposes:

my_list[0]= {1, 2, 3};
my_list[1]= {1, 2, 3};
my_list[2]= {9, 10, 11};
my_list[3]= {1, 2, 3};

So the output would just be

new_list[0]= {1, 2, 3};
new_list[1]= {9, 10, 11};

Let me know if you have any ideas. I would really appreciate it.

© Stack Overflow or respective owner

Related posts about c#

Related posts about list