Infosys interview question

They asked a simple algo regarding binary search