1835. Find XOR Sum of All Pairs Bitwise AND

Updated: 2024-03-12
1 min read
[]

On This Page

LeetCode problem 1835

class Solution:
    def getXORSum(self, arr1: List[int], arr2: List[int]) -> int:
        a = reduce(xor, arr1)
        b = reduce(xor, arr2)
        return a & b