C++ simple and easy solution
Code\n\nclass Solution {\npublic:\n    vector<int> findIntersectionValues(vector<int>& nums1, vector<int>& nums2) {\n        int a = 0, b = 0;\n        unordere
# Code\n```\nclass Solution {\npublic:\n    vector<int> findIntersectionValues(vector<int>& nums1, vector<int>& nums2) {\n        int a = 0, b = 0;\n        unordered_map<int, int> freq;\n        for(int i=0; i<nums1.size(); i++)\n            ++freq[nums1[i]];\n        for(int i=0; i<nums2.size(); i++) {\n            if(freq.find(nums2[i]) != freq.end()) {\n                ++b;\n                a += freq[nums2[i]];\n                freq[nums2[i]] = 0;\n            }\n        }\n        return {a,b};\n    }\n};\n```
['C++']