XOR of a thousand consecutive integers
Compute the bitwise XOR of every integer from to inclusive:
Show hints (2)+
- What is when is even?
- A range XOR equals prefix-XOR to XOR prefix-XOR to .
Answer
Reveal answer →Final answer
1
Create a free account to see the full worked solution and track your progress.
Interview format: Trading Aptitude Tests, Prop Trading