Infosys interview question

Binary search , oops, CN