Leetcode 2935. Maximum Strong Pair XOR II
Find the maximum bitwise XOR of two elements (you may pick the same element twice) from nums under the "strong pair" constraint |x−y| ≤ min(x,y) — equivalently max(x,y) ≤ 2·min(x,y), so pairs must lie within a factor of two. The core challenge is to efficiently search for the max XOR among values in this restricted range (typical approaches sort nums and use a sliding window with a binary trie or bitwise greedy queries).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.