|
Okay, I think I got it, but just making sure. Is this the behavior we want if I have the following:
1, 2, 3, 3, 3, 7, 7, 9, 9, 10, 11, 11, 13, 15, 17, For which value do you wish the search the above array? 0 Index of 0 is: 0 Press any key to continue I know "index of 0" is badly worded, but what I mean is the spot where elements to the left in the array are equal to or less than the given value, and elements to the right are strictly greater than. So if the value we are searching for is less than all of the elements of the array, in that case, our "B" would be 0, since that is the spot where all the values to the right would be strictly greater. (????) Thanks, Kristina
|
B=0 is correct in this case by Mike O'Donnell, 2001, Oct 20
to: