Map Easy Approch😊
Approach\n Describe your approach to solving the problem. \nThe Solution is size of array -max frquency\n\n# Complexity\n- Time complexity:O(N)\n Add your time 
# Approach\n<!-- Describe your approach to solving the problem. -->\nThe Solution is size of array -max frquency\n\n# Complexity\n- Time complexity:O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(N)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int maximizeGreatness(vector<int>& nums) {\n        int maxi=INT_MIN;\n        int n=nums.size();\n        map<int,int>m;\n        for(int i=0;i<n;i++){\n            m[nums[i]]++;\n            maxi=max(maxi,m[nums[i]]);\n        }\n        return nums.size()-maxi;\n    }\n};\n```
['C++']