How to find the maximum AND result between 2 elements in an array

Given an array, [2,3,4,5,3,7,1,6], how to find max(a[i] & a[j]) i != j other than brute force?

Comments (1)