LeetCode solutions

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

Read the problem on LeetCode View on GitHub

Python

Accepted on LeetCode — runtime 19ms, memory 22.5MB, accepted 2026-01-01.

python
class Solution:
        def doesValidArrayExist(self, derived: List[int]) -> bool:
                return sum(derived) % 2 == 0

Source