One-Liners
Python 3\npython\nclass Solution:\n    def findIntersectionValues(self, n1: List[int], n2: List[int]) -> List[int]:\n        return [(Counter(n1) & Counter({n: 
**Python 3**\n```python\nclass Solution:\n    def findIntersectionValues(self, n1: List[int], n2: List[int]) -> List[int]:\n        return [(Counter(n1) & Counter({n: 100 for n in n2})).total(), (Counter(n2) & Counter({n: 100 for n in n1})).total()]\n```\nNote that a simpler implementation is not efficient, as Python re-creates the set for each iteration. So, we might as well do the full scan.\n\n**Python 3**\n```python\nclass Solution:\n    def findIntersectionValues(self, n1: List[int], n2: List[int]) -> List[int]:\n        return [sum(n in n2 for n in n1), sum(n in n1 for n in n2)]\n```\n**C++**\n```cpp\nvector<int> findIntersectionValues(vector<int>& n1, vector<int>& n2) {\n    unordered_set<int> s1(begin(n1), end(n1)), s2(begin(n2), end(n2));\n    return {\n        (int)count_if(begin(n1), end(n1), [&](int n){ return s2.count(n); }),\n        (int)count_if(begin(n2), end(n2), [&](int n){ return s1.count(n); })\n    };\n}\n```\nTrue one-liner with the full scan.\n**C++**\n```cpp\nvector<int> findIntersectionValues(vector<int>& n1, vector<int>& n2) {\n    return {\n        (int)count_if(begin(n1), end(n1), [&](int n){ return find(begin(n2), end(n2), n) != end(n2); }),\n        (int)count_if(begin(n2), end(n2), [&](int n){ return find(begin(n1), end(n1), n) != end(n1); })\n    };\n}\n```
['C', 'Python3']