couldn’t figure out what is is
What is Y in the test case?
Y is the number you have to find in the range L, R present in the array
Y is the element of array in the range l to r
and x is the given element (given in query of type 1)
Question Explanation:
you have to visualize the array
initially array is empty
now if query of type 0 came you have to insert element into array
after these querys
0 3
0 5
0 10
0 6
array will be [3,5,10,6]
now query type 1 came
1 1 4 6
you have to take array portion from 1 to 4 and take xor with 6
whose xor is max is the ans
3^6 = 5
5^6 = 3
10^6 = 12
6^6 = 0
max ans is 12 for 10 so ans is 10
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.