I have an List which contains 1,2,4,7,9 for example.
List
I have a range from 0 to 10.
Is there a way to determine what numbers are missin
for a List L a general solution (works in all programming languages) would be simply
L.Count()*(L.Count()+1)/2 - L.Sum();
which returns the expected sum of series minus the actual series.
for a List of size n the missing number is:
n(n+1)/2 - (sum of list numbers)