Binary search
In a sorted array, one comparison with the middle item rules out half of what is left, so binary search keeps $lo$ and $hi$ around the only stretch where the target can be and finishes in about $\log_2 n$ steps.
In a sorted array, one comparison with the middle item rules out half of what is left, so binary search keeps $lo$ and $hi$ around the only stretch where the target can be and finishes in about $\log_2 n$ steps.