#3599

Partition Array to Minimize XOR

expert · 1005 · lc medium +32 · 41.1% accepted · 107 likes · top 21%

Description

Divide integer array nums into exactly k non-empty contiguous parts. Compute the XOR of each part.

Return the minimum possible value of the maximum XOR across all k parts.

Code

1
2
3