Infosys Interview Question

Binary search , oops, CN