3845. Maximum Subarray XOR with Bounded Range
You are given a non-negative integer array
numsand an integerk.You must select a subarray of
numssuch that the difference between its maximum and minimum elements is at mostk. The value of this subarray is the bitwise XOR of all elements in the subarray.Return an integer denoting the maximum possible value of the selected subarray.