Concerto Software interview question

Binary search logic