2792. Neighboring Bitwise XOR
My accepted Python solution to LeetCode problem 2792, Neighboring Bitwise XOR, running in 19ms.
- Difficulty: Medium
- Python
- Runtime 19ms
- Memory 22.5MB
- Updated
Read the problem on LeetCode View on GitHub
The problem statement is LeetCode’s and stays on their site. What follows is my accepted solution.
Python
Accepted on LeetCode — runtime 19ms, memory 22.5MB, accepted 2026-01-01.
class Solution:
def doesValidArrayExist(self, derived: List[int]) -> bool:
return sum(derived) % 2 == 0