Search
⌘K

Leetcode 3277. Maximum XOR Score Subarray Queries

Given nums (n ≤ 2000) and up to 10^5 queries [l,r], for each query return the maximum "XOR score" among all contiguous subarrays of nums[l..r], where the XOR score is obtained by repeatedly replacing adjacent pairs with their XOR until one value remains. The core challenge is efficiently computing or precomputing this non‑standard fold for all O(n^2) subarrays so you can answer many range-maximum queries quickly.


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.