Given an array and queries, find XOR of elements in range . XOR is NOT idempotent: . For XOR, you can't use the overlap trick. Options:
Prefix XOR: . Build in , query in .
Disjoint Sparse Table: build, query.
Regular Sparse Table: build, query (non-overlapping ranges). For XOR particularly, prefix XOR is simplest and fastest.