It works on the basis that the midpoint is not the best guess in many cases; for example, if the target value is close to the highest element in the array, it is likely to be located near the end of the array.
The midpoint is not the best guess in many cases. This works on the basis. It is likely to be located near the end of the array. This was for example. The target value is close to the highest element in the array.