Re: Algorithm to find break in contiguity



One way would be
1.) Sum (1 to N )numbers is N(N+1)/2 -->This is sum with the missing
number.
2.)Missing_number= Sum -(Sum of 1 to N-1 numbers)

This can be expanded to find out the missing number from k to N.
-Vinay

.