leetcodeSolution to some Leetcode problems written in C++ |
git clone git://git.dimitrijedobrota.com/leetcode.git |
Log | Files | Refs | README | LICENSE |
1835.cpp (288B)
0 class Solution { 1 public: 2 int getXORSum(const vector<int> &arr1, const vector<int> &arr2) const { 3 static const auto count = [](const auto &arr) { 4 return accumulate(begin(arr), end(arr), 0, bit_xor()); 5 }; 6 return count(arr1) & count(arr2); 7 } 8 };