/ Published in: C++
iterative analog of the recursive binary search
Expand |
Embed | Plain Text
int iterBinarySearch( int[] array, int lower, int upper, int target ){ int center, range; if( lower > upper ) return LIMITS_REVERSED; while( true ){ range = upper - lower; if( range == 0 && array[lower] != target ) } }
You need to login to post a comment.
