1486. XOR Operation in an Array
https://leetcode.com/problems/xor-operation-in-an-array
Description
Given an integer n
and an integer start
.
Define an array nums
where nums[i] = start + 2*i
(0-indexed) and n == nums.length
.
Return the bitwise XOR of all elements of nums
.
Example 1:
Example 2:
Example 3:
Example 4:
Constraints:
1 <= n <= 1000
0 <= start <= 1000
n == nums.length
ac
Last updated