Using Two Unordered Map
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> findIntersectionValues(vector<int>& nums1, vector<int>& nums2) {\n        unordered_map<int,int>m,m1;\n        int ans1=0,ans2=0;\n        for(auto x:nums1){\n            m[x]++;\n        }\n        for(auto x:nums2){\n            if(m.find(x)!=m.end()){\n                ans2++;\n            }\n        }\n        for(auto x:nums2){\n            m1[x]++;\n        }\n        for(auto x:nums1){\n            if(m1.find(x)!=m1.end()){\n                ans1++;\n            }\n        }\n        return {ans1,ans2};\n    }\n};\n```
['C++']