XOR Queries of a Subarray

Medium · Bit Manipulation · about 15 minutes

Asked at Amazon, Google, Microsoft.

Given arr and queries[i] = [left, right], return the XOR of arr[left..right] for each query.