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


#1

Comment body goes here.


#2

for n>=6, yes it can be done


#3

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)