Recro interview question

Binary search problem