Comment body goes here.

# Can the upper bound of the loop be reduced to n/2.Since n/2*n/2> n(obviously)

I donâ€™t understand what you mean, if you are implementing it using binary search (recursion method) than it should not take more than log(n).

plz elaborate what you mean by (n/2*n/2)