Can u please explain the sample input and ourput
Range Xor Problem
Hey @AbhishekAhlawat1102
Let me show you through example
5
0 3
0 5
0 10
0 6
1 1 4 6
5 is the no of queries
For the first query , which is 0 type .
You’ve to insert 3… So array is 3
For the next three queries… you’ve to add 5, 10, 6… so array becomes 3,5,10,6
So last query…1 1 4 6
L = 1, R = 4, and x is 6
So you’ve to find a number from index 1 to 4 whose xor with x is maximum.
So for index 1 , xor 6 with 3
Index 2, xor 6 with 5
Index 3, xor 6 with 10
Index 4 xor 6 with 6
Maximum of all these xor will be the ans