
Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Notice that the bitwise AND of two different numbers will always be strictly less than the maximum of those two numbers.
What does that tell us about the nature of the subarray that we should choose?