Let for a particular index i check that condition A[i]==A[i+1] or not..
if it is true then (check A[2i]==A[n/2+1] or not )
else select i+1 for same purpose..
let size of array is 100 and A[0]=A[2]=A[4]!=A[8]
then dont check for A[2] as well as A[4]..
this ll reduce no of comparison to logn..