I’m following the “pass-the-technical-interview-with-java” path and can’t see why my answer is incorrect.
The question looks like this:
To me the statement I picked seems to be an incorrect statement because ‘right’ value is only set to mid if the target value is less than midValue. If the target value is equal to midValue, mid is returned and the else block won’t be reached.
I would like to know if I’m missing something.