Infosys interview question

Simple search algorithm: binary search