Problem Brief
Maximum XOR Suffix
NEW GRADINTERNOA
See Tiktok online assessment and hiring insights
An array of n integers, arr, is given. Pick any index then calculate the XOR of the array from that index through the highest index. Append the value to the array. Repeat this process zero or more times. Determine the highest value possible.
Function Description
Complete the function maximumValue in the editor below.
maximumValue has the following parameter:
int arr[n]: the starting array
Returns
int: the maximum possible value in the array
1Example 1
Input
arr = [8, 2, 4, 12, 1]
Output
14
Explanation

Explantion is shwon in the image above pint ππ
The max strength possible is 14.
2Example 2
Input
arr = [1, 2, 3]
Output
3
Explanation
Regardless of what index is chosen, the XOR value can never be greater than 3 :)
Constraints
Limits and guarantees your solution can rely on.