Exercises/#90 XOR Queries of a Subarray
#90

XOR Queries of a Subarray

Medium⚡ Bit Manipulation
80 XP

Problem

Given an array and queries [l, r], return the XOR of all elements from index l to r for each query.

Examples

Input: arr=[1,3,4,8], queries=[[0,1],[1,2],[0,3],[3,3]]
Output: [2,7,14,8]
bit-manipulationprefix-sumxor
AI Assistant— powered by AI

Unlock hints progressively — start gentle, go deeper only if needed.

💡

Level 1: Gentle Nudge

A subtle direction

🗺️

Level 2: Approach

The algorithm to use

🔍

Level 3: Detailed

Step-by-step guidance

90 / 150

Your Solution

⚡ JavaScript

to save progress and use AI features