TC- O(n*m + klogk) 🔥 || SC- O(n*m +k) 🔥 || [With Explanation]
Intuition\n Describe your first thoughts on how to solve this problem. \nTo find the intersection of multiple arrays, the goal is to identify the elements that 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nTo find the intersection of multiple arrays, the goal is to identify the elements that are present in all the arrays. A straightforward approach is to use a hash map to count the occurrences of each element across all arrays and then select those elements that appear in all of them.\n# Approach\n<!-- Describe your approach to solving the problem. -->\nWe can use an unordered map to store the frequency of each element across all arrays. First, we iterate through each element of every array and update its count in the map. After counting the frequencies, we traverse the map to identify the elements whose frequency equals the number of arrays, indicating that these elements are present in every array. Finally, we collect these elements into a result vector and sort it before returning.\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n    O(n*m + klogk)\nwhere n*m is to traverse the 2d array of n*m size and k is the list of integers that we need to return and sorting these k element takes klogk time.\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n    O(n*m + k)\nn*m to store occurences of all the integers in the 2d array. And k is to store answer elements in vector v.\n# Code\n```\nclass Solution {\npublic:\n    vector<int> intersection(vector<vector<int>>& nums) {\n        unordered_map<int,int> m;\n        for(int i=0;i<nums.size();i++)\n        {\n            for(int j=0;j<nums[i].size();j++)\n            {\n                m[nums[i][j]]++;\n            }\n        }\n        vector<int> v;\n        for(auto i:m)\n        {\n            if(i.second==nums.size())\n                v.push_back(i.first);\n        }\n        sort(v.begin(),v.end());\n        return v;\n    }\n};\n```
['Array', 'Hash Table', 'Sorting', 'Counting', 'C++']