Good point. I had assumed that the array is sorted. Although not
mentioned in the original email, seeing the 1,2,3...n progression led
me to assume so. If the array is not sorted, I would definately sort
first.
Perhaps there is a method where I can scan for missing numbers while
sorting, or lo
I can't see a way to do this in less than O(n) time, unless I can take
advantage of the way the data is stored. If the numbers were stored in
a simple C-style array, and the numbers were sparsely missing,
something like this could be done:
//This value is to be adjusted based on the character o