Walmart | Data Science | 4 December

Walmart · Question · Posted Apr 2020

There is an infinite array. A[0] = 0, A[i] = A[i-1]XOR(i) There are a number of queries having L, R. For each query, find the XOR of the elements between L and R(inclusive) Constraints: 1 <= L,R <=10^15, 1 <= Q <= 10^5

The full answer & interview discussion are available to premium members.

Log in Create a free account