Every Easy Solution using STL Concept
Intuition\n Describe your first thoughts on how to solve this problem. \nTake two unordered maps and insert elements into it\n\n# Approach\n Describe your appro
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nTake two unordered maps and insert elements into it\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nJust search the elements as per the questions \n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(N+M)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(N+M)\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> findIntersectionValues(vector<int>& nums1, vector<int>& nums2) {\n        int n=nums1.size();\n        int m=nums2.size();\n        unordered_map<int,int> mp;\n        unordered_map<int,int> mp1;\n        for(int i=0;i<n;i++)\n        {\n            mp[nums1[i]]++;\n        }\n        for(int i=0;i<m;i++)\n        {\n            mp1[nums2[i]]++;\n        }\n        int count=0,count1=0;\n        for(int i=0;i<n;i++)\n        {\n            if(mp1.find(nums1[i])!=mp1.end())\n            {\n                count++;\n            }\n        }\n        for(int i=0;i<m;i++)\n        {\n            if(mp.find(nums2[i])!=mp.end())\n            {\n                count1++;\n            }\n        }\n     return {count,count1};\n     }\n};\n```
['C++']