C# Check for missing number in sequence

Posted by Jon on Stack Overflow See other posts from Stack Overflow or by Jon
Published on 2010-03-19T08:11:12Z Indexed on 2010/03/19 8:21 UTC
Read the original article Hit count: 130

Filed under:
|
|
|

I have an List<int> which contains 1,2,4,7,9 for example.

I have a range from 0 to 10.

Is there a way to determine what numbers are missing in that sequence?

I thought LINQ might provide an option but I can't see one

In the real world my List could contain 100,000 items so performance is key

© Stack Overflow or respective owner

Related posts about c#

Related posts about c#3.0