Not able to solve

do we have to use binary search in this question if yes then how

Yes you have to use binary search. There must be a lecture video on this in Binary Search section of your course.
You can refer this video

1 Like