What's the most efficient way to get a first free spot from sorted query returning int collection ?
eg.: {1,2,3,4,6} | result.: 5
At the moment I am using foreach and counter that compares current value from sorted quety.ToList() which takes about 600ms on 100 000 records.