How to approach this

Is binary search used here?

@bhavik911,
Yes it is used here

Got ot thanks( limit approaching)