using hash-map
Intuition\n Describe your first thoughts on how to solve this problem. \nusing hash map\n\n# Approach\n Describe your approach to solving the problem. \ncountin
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nusing hash map\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\ncounting the frequency of elements\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\no(mn)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\no(klogk)\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> intersection(vector<vector<int>>& nums) {\n      unordered_map<int,int>mp;\n      for(auto it:nums)\n      {\n        for(auto i:it)\n        {\n            mp[i]++;\n        }\n      }\n      int n= nums.size();\n      vector<int>ans;\n      for(auto it:mp)\n      {\n        if(it.second==n)\n        {\n            ans.push_back(it.first);\n        }\n      }\n      sort(ans.begin(),ans.end());\n      return ans;\n    }\n};\n```
['C++']