Leetcode 3287. Find the Maximum Sequence Value of Array
Pick a subsequence of length 2k (preserving order) and split it into the first k and last k elements to maximize (OR of the first half) XOR (OR of the second half). With n ≤ 400 and nums < 2^7, the problem is a bitwise/DP optimization over OR states.
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.