XOR in Array

Compute the XOR of all elements in a generated sequence. Given integers n and start, build an array nums where each element equals start + 2 * i for i from 0 to n - 1. Return the bitwise XOR of every element in this array.

Examples
Input: [1,3]
Output: 3
Hints

XOR in Array

Compute the XOR of all elements in a generated sequence. Given integers `n` and `start`, build an array `nums` where each element equals `start + 2 * i` for `i` from 0 to `n - 1`. Return the bitwise XOR of every element in this array.