Simple No Map || Count Sort || C++ || Beats 86%
Intuition\nif the frequency of an element equals the size of array then it is present in each of the arrays as each array has unique elements.\n Describe your f
# Intuition\nif the frequency of an element equals the size of array then it is present in each of the arrays as each array has unique elements.\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\nJust store the frequency of the elements in an array and return the elements whose frequency is equal to the size of nums.\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: $$O(n*m)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(n*m)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> intersection(vector<vector<int>>& nums) {\n\n        ios_base::sync_with_stdio(false);\n        cin.tie(NULL);\n        cout.tie(NULL);\n\n        vector<int> ans(1001, 0);\n        int n = nums.size();\n\n        for(int i =0; i < n; i++){\n            for(auto it : nums[i]){\n                ans[it]++;\n            }\n        }\n        vector<int> finalans;\n        for(int i =1; i <= 1000; i++){\n            if(ans[i] == n){\n                finalans.push_back(i);\n            }\n        }\n\n        return finalans;\n    }\n};\n```
['C++']