XOR of a given range
Submissions: 1858   Accuracy:

57.11%

  Difficulty: Easy   Marks: 2

You are given an Array. Your task is to complete the function gtXor to return the XOR of the given range a and b.

Input:
First line consists of T test cases. First line of every test case consists of 3 integers n,a and b ,denoting number of elements, lower range and higher range respectively. Second line consists of elements of array.

Output:
Return the Xor value .

Constraints:
1<=T<=100
1<=N<=100
1<=a,b<=N

Example:
Input:

1
6 1 3
1 3 5 7 9 11
Output:
1

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Raj Seth
Author: saksham seth


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.