Intersection of Multiple Arrays Solution in C++
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)$$ -->\nO(n^2)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(n)\n# Code\n```\nclass Solution {\npublic:\n    vector<int> intersection(vector<vector<int>>& nums) {\n        int i, j, flag=0;\n        vector<int> ans;\n        for(i=0 ; i<nums[0].size() ; i++)\n        {\n            flag=0;\n            for(j=1 ; j<nums.size() ; j++)\n            {\n                if(count(nums[j].begin(), nums[j].end(), nums[0][i])==0)\n                {\n                    flag=1;\n                    break;\n                }\n            }\n            if(flag==0)\n            {\n                ans.push_back(nums[0][i]);\n            }\n        }\n        sort(ans.begin(), ans.end());\n        return ans;\n    }\n};\n```
['C++']