Search
⌘K

Leetcode 2939. Maximum Xor Product

Choose an integer x in [0, 2^n) to maximize (a XOR x) * (b XOR x) (answer mod 1e9+7); the core challenge is picking x’s bits jointly to maximize the product, requiring bitwise DP/greedy reasoning across up to 50 bits rather than brute force.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.