Search
⌘K

Leetcode 1835. Find XOR Sum of All Pairs Bitwise AND

Compute the XOR of arr1[i] & arr2[j] across all pairs (i,j); use per-bit parity/linearity to avoid O(n·m) work and reduce it to combining the arrays' XORs (result = XOR(arr1) & XOR(arr2)).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.