| 1 | class Solution: |
| 2 | def xorOperation(self, n: int, start: int) -> int: |
| 3 | # build the initial array of numbers following the formula |
| 4 | nums = list() |
| 5 | for i in range(n): |
| 6 | nums.append(2 * i + start) |
| 7 | |
| 8 | # compute the xor of all of the numbers |
| 9 | xor = nums[0] |
| 10 | for num in nums[1:]: |
| 11 | xor ^= num |
| 12 | return xor |
nothing calls this directly
no outgoing calls
no test coverage detected